MailMerge: Conditional Table Cell Colors using Filter Instructions
Summary
The TXTextControl.DocumentServer.MailMerge class provides an extensible framework to inject custom logic to the merge process. This combination allows creative implementations such as conditional table cell colors based on specific filter instructions. In the following sample, the table cell Qty should be highlighted red, if quantity is higher than 10, otherwise it should be green. These conditions can be adjusted in the following dialog: When merging the document, the conditions are evaluated in the custom events: The class CellFilterInstructions contains the instructions for the custom filter: This class is serialized as JSON and stored in the TXTextControl.TableCell.Name property. After changes are made, the object is stored as a serialized JSON string back in the TableCell.Name property.