Articles on: Workflow Apps

Configuring Totals and Subtotals in Reference Grids

Last Updated: December 16, 2021

You may add subtotal and total fields in your form to automatically compute costs and other additional charges that may incur in creating your form.

PREREQUISITES

Create at least 2 Records or Datasets
1st Record or Dataset - This will be attached to the reference grid.
2nd Record or Dataset - This will be used to generate additional value to the Subtotal field.

SETUP

Step 1: Create three separate columns:
1 Text Field - This will act as the Subtotal field.

Configuration:
Fill out the Field ID, Place Holder and set the Input Type to Number



1 Dropdown / Checkbox / Radio field - This will serve the purpose of adding another value apart from the values present in our reference field.

Configuration:
Fill out the Field ID and Place Holder, then enable Use External Dataset and Use in Expression Builder. Then, select the 2nd Record or Dataset** and select the column that will add value to the value in the reference grid under Value Column.


1 Label field - This will act as the Total field.

Configuration:
Fill out the Field ID and Place Holder and enable Has Totals. Then add 2 configurations and select the two fields above for each Expression with (+) Add as their Operator.




Step 2: Create a Reference Grid and attach a record with numeric values.
Configuration:
Fill out the Lookup Grid Name and select the 1st Record under Data Table. Then, select the columns that you want to display on your reference grid.

Make sure that you include the column that contains the value that will be used to generate the Subtotals and Totals fields.

Then, enable Has Totals and under Reference table control / column, select the column that contains numeric value in your reference grid.
Under Form Control, select the Subtotals field.



Your form should look like this:



Go to Desktop preview to check if the form is working correctly.


In this sample form:
Form Configuration:
Labor Cost = Subtotals
Priority = 2nd Record with accompanying additional value
Total = Labor Cost + Priority

Selecting an item in the reference grid allows the Labor Cost to reflect in the subtotals field. Then, using the Priority dropdown, each priority level has its own value, which is added to the Labor Cost. The two values are then compounded in the Totals field.

Updated on: 25/05/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!