The Actions tab allows you to trigger updates to one or more fields in a form automatically when the value of a source field is set or changes. This is useful in situations where the source field is used to look up a record and populate the form with corresponding information.
For example, based on the value captured into the code field (i.e. the field that will be used as the lookup) you can set the value of the facility_name and facility_last_visit fields by looking this information up in a CSV file (uploaded to your project resource library) that contains a list of facilities. This CSV file could look something like:
|10001||Hillcrest High School||2018-05-12|
|10002||Kloof High School||2018-06-13|
- Open the Actions tab of the field that will serve as the "lookup" - in this example - the code field.
- From the Actions tab, select the field(s) that will be set when code is captured or changed - in this example, the facility_name and facility_last_visit fields.
- For each field you wish to update, enter a value or use a function to set the value. In this example, the pulldata() function is used to retrieve the name of the facility (stored in the "facility_name" column) and the date the facility was last visited (stored in the "last_visit" column) based on the code entered (which is used to search the "facility_code" column).
Each time the value for code changes, the values of facility_name and facility_last_visit are updated. In the example below, this information is stored in calculated fields that are just displayed in a confirmation but the same functionality can be used to set any type of field.