Combining Form Fields and Formulas with Conditional Instructions
Using conditional instructions, it is possible to add dependencies between fields based on logical operators. This allows to add a complete workflow to forms by adding dependencies between form fields. This sample shows how to combine form fields with table cell formulas.

A very unique feature of form fields in TX Text Control is the usage of Conditional Instructions. It is possible to add dependencies between fields based on logical operators. This allows to add a complete workflow to forms by adding dependencies between form fields.
Combining Instructions and Formulas
The following animated screenshot shows such a condition. If the user changes the selected product in the drop-down form field, the description and the unit price is changing:
Dynamic Content
The first condition product selection is shown in the next screenshot. If the selected item is Product 1, then the product description, the default quantity and the unit price is set dynamically. The screenshot shows the out-of-the-box dialog that can be used to create these instructions. But they can be also created programmatically in case that data must be added dynamically, for example from data sources.
Using Formulas
The next screenshot shows the cell (circled in green) and the corresponding formula (circled in red) to calculate the line total. Essentially, the formula multiplies the quantity with the unit price:
You can see that the line total table cell is a form field. That shows that a form field value can be changed by a formula and formulas can use form field values to calculate the results. On other words: Both elements can be combined.
Another instruction is setting a tax percentage value in case a check box is checked:
The instruction for this action can be seen in the next screenshot:
The formula for this calculation is circled in red. Because the cell value type is percentage, we only need to multiply the total line value with the sales tax value that has been set dynamically using the form field conditions:
Finally, the total amount is calculated by adding up the tax value and the line total:
Demo Template
You can download the demo template for your own tests here:
Test this on your own by downloading one of our trial versions for your platform or use our live demos.
Related Posts
X18 Outlook: Creating and Completing Forms with TX Text Control
This very early sneak peek shows a new feature that allows the creation and completion of MS Word compatible forms.
TX Text Control 33.0 SP3 is Now Available: What's New in the Latest Version
TX Text Control 33.0 Service Pack 3 is now available, offering important updates and bug fixes for all platforms. If you use TX Text Control in your document processing applications, this service…
TX Text Control 33.0 SP2 is Now Available: What's New in the Latest Version
TX Text Control 33.0 Service Pack 2 is now available, offering important updates and bug fixes for all platforms. If you use TX Text Control in your document processing applications, this service…
Document Lifecycle Optimization: Leveraging TX Text Control's Internal Format
Maintaining the integrity and functionality of documents throughout their lifecycle is paramount. TX Text Control provides a robust ecosystem that focuses on preserving documents in their internal…
Expert Implementation Services for Legacy System Modernization
We are happy to officially announce our partnership with Quality Bytes, a specialized integration company with extensive experience in modernizing legacy systems with TX Text Control technologies.