Configuring Table Fields

In the Therefore™ Solution Designer users may configure categories to have Index Data Table Fields. In this tutorial we will go over configuring such a field and setting one of the column values in the table to default to a value in another index field. As an example, table is created where the user can add a row per item on an invoice, and have one of the columns in this row default to what the current remaining amount on the invoice is.

Category Configuration

1. Start by adding a Table Field to a category, and configuring it with the desired fields. Additionally, an index data field that will feed data into one of the columns will be required.
Image showing a table field

2. In this example, we will be configuring the 'Remaining' field to calculate how much of the invoice is left to account for any time a new item is added to the table. This value will later feed back into one of the columns in the table.
Image showing calculation

3. Following this, we can configure the 'Remainder' column in the table to have its default value as the current 'Remaining' value. To do this, access the 'Field Properties' by right clicking the column. In the 'Field properties' dialog, right-click the 'Default' field and select the Index Data you want to use as a default value. In this example we will use the 'Remaining' field. Press OK to save the field properties and save the category. It will now be ready for use.
Image showing the Default field

Behavior when adding a document to the category

When adding a document to this category, any new row added to the table will automatically have the 'Remainder' field take the current value in the 'Remaining' field.
Image showng the category in an end user client

By using the formula from step 2, the 'Remaining' field will update in real time as more rows are added to the table. However, the 'Remainder' field will remain as a snapshot of the value in 'Remaining' at the time the row was added.
Image showing the calculation use case

See also the reference on Default values on the following reference page:

Field Properties