- Set up a Filter
- Filter Types
- Additional Filtering Options
- Filtering Data Based on Username
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.
- In the Form Builder, mouse over the desired Dropdown, Multiselect, or Radiobutton question.
- Select Edit Properties, then navigate to the Radiobutton/Multiselect/Dropdown Properties tab.
- Select Data Source as the source data.
- Choose the data source from the list of available sources.
- Set the Display column as the column from the data source that should be visible to users.
- Check the Apply Filtering box.
- Select the column that the filter should be based off of.
- Select a Filter Type, outlined below.
Text-based filtering is useful when a data source is referenced by multiple forms; each form can employ a text-based filter. Setting up this option will filter all data that contains the text entered in the Filter String field.
This is useful if users should only see information for customers in a particular area. For example, if users should only see information for customers located in a specified state, an administrator can select the column containing the location as the Display Column, and enter “New York” as the Filter String. The users will only see locations containing “New York.”
Allow field users to enter in their own text string to filter data. For example, if a user needs to search for a customer in New York state, they can enter “New York” into a simple textbox. The question will then list only customers located in New York.
- Create a simple textbox question preceding the Dropdown/Radiobutton/Multiselect
- In the question, choose Question-Based filtering.
- Select the Filter Source.
Configuring this option will filter the lookup to display only the ProntoForms username of the user logged into the mobile device. This filter method is useful for allowing a sales rep or field technician to select their own username. To filter data based on the user's username, see below.
Define the match type to control what values are considered a match.
The following examples use this data source as a reference:
Only exact matches to the filter string (no additional characters) will be considered a match. For example, if searching for a District ID "1", only the value "1" will be shown. District ID's like "12", "11", "31", etc, will not.
Matches are limited by what letters or numbers the filter string contains. For example, a user searches for "New". The filter will show all values that contain "New" - New York, New Hampshire, New Mexico.
Shows only data that begins with the filter string. For example, if the string is 914, only phone numbers beginning with the 914 area code will be listed.
Shows only data that ends with the filter string. For example, it is possible to show only selections that end in "Mexico".
This option hides duplicate values in a list. For example, a customer named "John Doe" might be in multiple rows in a data source. With this option turned on, the name "John Doe" would appear only once in the list in the mobile form.
To filter a lookup to display data associated with a username, rather than displaying the username itself, use a Question-Based filter. This would be useful for this data source:
To allow ProntoForms user "John Smith" to view only his customers in a dropdown question:
1. Create a simple textbox question before the dropdown question.
- This can be marked as Read-Only, Hidden on Device and Hidden on Reports to hide the filtering mechanism from the user.
- In the textbox properties, check the box for Insert User’s Username as Default Value.
2. View the properties of the dropdown question and configure the Question-based filter with the simple textbox as the Filter Source. Select "Rep" as the filtered column.
- This will filter out rows in the data source not containing the username "John Smith."
- Selecting “Customer” as the Display Column would allow John Smith to see only the customers associated with his username.
An alternative to this is filtering data based on username by applying partitions at the data source level; this filtering configuration can then apply to any form the data source is associated with.