Note: This feature is coming soon and is not yet generally available.
When a data source is in use, a filter can be added to a Dropdown, Multiselect, or Radiobutton question. This can shorten the list of options available in a question, making it easier and faster for users to fill out a form.
Note: This article discusses filters that are set up within individual forms. An alternative to this is filtering data by applying partitions at the data source level; this filtering configuration can then apply to any form the data source is associated with.
The filter option is only visible on dropdown, radiobutton, or multiselect questions in the Options screen. To create a filter, follow the steps below:
- Ensure your Dropdown, Radiobutton, or Multiselect uses a data source.
- Choose the data source from the list of available sources.
- Set the Column displayed in dropdown to what you want your mobile users to see. Select which associated column you want to submit to the server. These do not have to be the same.
- Toggle the Filter Options on.
- Select the Filter Column. This is the reference information for the filter, or the part that will be checked to see if it matches the filter rule.
- Select the operator: Equals, Contains, Starts With, or Ends With.
- Set up the comparison data, or the information the reference is being compared to. This can be another existing question, the user's username, or a static string (entered by typing in the box).
- Mobile user's username: This will ensure mobile users only see the data associated with the ProntoForms username of the user logged into the mobile device. So, for example, if you are using an inspection form with a field that requests the user enter their User ID (perhaps to populate later questions) you can select this option and they will be able to select only their own ID.
- Question: This uses a previous question's answer to filter data. Most often, this is a text box question with a Free Text data type. For example, a previous question might ask for a client's State. The mobile user enters "New York", and this filter will pick up on that and only show clients located in New York.
- Constant: This is a constant string. For example, if you wished to show entries where the email contained "test", you could enter "test" as a constant. This would display only emails containing "test"