Criteria in Import Picklist
By default, a picklist field of type "Import Data from form", will display all the values of the imported field. To set a picklist to display only specific values from the imported field, you can specify the required criteria and display only those values that satisfy the criteria.
The Import picklist criteria can also be specified from the GUI. Refer FAQ -> Form Fields, for more information. Assume a form named FormA has two fields "Country" and "State" to enter the name of a country and its states. The FormA view is given below:
Now, you want to create another form named "FormB", that has the field "IndianStates" of type picklist that needs to import only the names of the states that belongs to the country "India" from FormA. The deluge script to do this is given below: Deluge code:
where the expression, FormA[Country == "India"].State - Fetches only the "State" values from "FormA" whose "Country"is "India". The FormB given below displays only the names of the States belonging to the country "India".
Deluge Reference - Add to Picklist Dynamically |