Form Builder Lookup Element
Table of Contents
- What are Dynamic Attributes?
- What does the Filter Attribute do?
- How do I apply the Filter Attribute?
- What element types support filtering?
- API Filter
What are Dynamic Attributes?
Dynamic Attributes are the successor to those pesky Reference IDs. They will allow users to create new custom settings at the Page and Element level and do it in a much more organized and scalable fashion. As an example, we developed a way to allow the Time or Date-Time element to be shown in either a 12 or 24-hour time format.
What does the Filter Attribute do?
When used in tandem with the Lookup element, the Filter attribute restricts the selectable/viewable records based on criteria you determine using filters such as equal to, like, greater than, less than, etc.
PLEASE NOTE: This Dynamic Element Attribute is available with iForm for iOS 8.36 and iForm for Android 8.12.
How do I apply the Filter Attribute?
To apply the Filter Attribute to the Lookup element, follow the instructions below.
STEP 1. With your form loaded in the Form Builder, highlight the Lookup element where you'll be applying the filter.
STEP 2. Under the Element Properties section, click the Dynamic Attributes drop-down.
STEP 3. Select Filter from the drop-down choices.
STEP 4. From the Field Name drop-down menu, select the field you'll use to filter by.
STEP 5. From the Condition drop-down menu, select the condition under which the filter is applied.
PLEASE NOTE : When using the LIKE Condition wildcard characters (%) are automatically added around the 'Field Value'
STEP 6. You'll now add the value you want the field to match. You have four options to choose from.
- String: This is used for text-based fields. Be sure to put quotes around your value in this instance.
- Number: This is used for number-based fields.
- Data Column Name: Used if you are comparing it to values in another element on the form.
- iFormBuilder Function: Used if you are comparing it to another element on the form that uses one of our Built-In Functions.
You can multiple filters to a Lookup element by clicking +Group and adding the filters.
STEP 7. Once your filter(s) is in place, click Confirm.
Once you've confirmed, you can see your filter in two different formats.
STEP 8. Save your form.
STEP 9. Test the filter on your device.
Here is what the data table looks like before the filter is added in the form builder:
And here is what it looks like with the filter added. Notice only the record with Joe as the employee name is shown.
To create filters using the API, have a look at the documentation HERE.
What element types support filtering in the Lookup element?
The below elements support the Filter Attribute when using in conjunction with the Lookup element.
Description: Restrict the selectable records based on criteria
|Attribute Label||Attribute Name||Attribute Type||Accepted Values|
The filter's value will consist of a JSON array with field_name, condition and field_value. A simple example of a filter looks like this.
"condition": "not like",
"condition": "is not null",
In SQL, this would look like:
(bag_size Not Like small) AND ((zipper_count= 145) OR(select_widget is not
Below symbols that can be used in the condition object.
Not Equal to
Greater than or equal to
|Less than or equal to||"<="|
|Not Like||"not like"|
|Is NULL||"is null"|
|Is not NULL||"is not null"|