What are dynamic values?
Dynamic Values are used to apply a value to an element based on specific conditions.
How does this apply in a real world scenario?
Say you have three different number elements, and in a fourth element, you want to add the previous three elements together. You can use Dynamic Values to populate the fourth element with that total.
How do I add dynamic values to an element?
To add a dynamic value to an element on your form, please follow the instructions below.
things you'll need
DATA COLUMN NAMES
Once your form is loaded in the form builder, click on the first element that will be used in your calculation, and in the Dynamic Value field put number_1="" (number_1 is the example data column name in this example). This will set the element to an empty string and ensure that the element resets with each new record.
Be sure to repeat these steps for each of the elements used in the calculation. Failure to do so will cause the calculation to fail.
Save your form.
Test the functionality on your device.
Enter data into the first three fields.
You'll see the fourth element (Total) is populated with the calculation.