iFormBuilder Dynamic Attributes
Table of Contents
- What are Dynamic Attributes?
- How do I use Dynamic Attributes for Elements?
- What are the Current Available Page Dynamic Attributes?
- What are the Current Available Element Dynamic Attributes?
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 on the device view only. The server will store the data in 24 hour format as it always has been.
It allows us as a company to create more new element features more quickly and efficiently.
How do I use Dynamic Attributes for Elements?
STEP 1. With your form loaded in the Form Builder, click the element you wish to add Dynamic Attributes to. In this example, will be using the Date-Time element.
STEP 2. Under the Element Properties, you'll see the Dynamic Attributes section. From the drop-down, add the attributes to the element.
PLEASE NOTE: If no Dynamic Attributes are available for a particular element type, you'll see the following message.
STEP 3. The Dynamic Attribute list will populate. In this example, choose your time format.
STEP 4. Save your changes.
What are the Current Available Page Dynamic Attributes?
API Information
Attribute Label | Attribute Name | Attribute Type | Accepted Values | Description |
Disable 'Delete Records' Button on Device | delete_records_button_disable | boolean | true | false | This removes the Delete Records icon from all devices for this form. |
Update Assigned/Completed Records | update_assigned_completed_records | boolean | true | false | Enabling this option will update Assigned or Completed Records if that same record is re-assigned. |
Map Priority | map_priority | text_area | "location_element, gps_element" | Order of display on Map View |
Map Top Location Disable | map_top_locaiton_disable | boolean | true | false | Disable the top location from being checked initially. |
What are the Current Available Dynamic Element Attributes?
Below will be listed the current available dynamic attributes for elements. It will go over how and what they do, as well as the required fields when using our API. Our API documentation can be found here.
12/24 Hour Time
Description: This allows the form builder to decide how the clock will display on the device, 12 or 24 hour time. This will override the device settings.
API Information
Attribute Label | Attribute Name | Attribute Type | Accepted Values |
12/24 Hour Time | 12_24_hour_time | select | "12hr" | "24hr" |
12/24 Hour Time
Description: This allows the formbuilder to decide how the clock will display on the device, 12 or 24 hour time. This will override the device settings.
API Information
Attribute Label | Attribute Name | Attribute Type | Accepted Values |
12/24 Hour Time | 12_24_hour_time | select | "12hr" | "24hr" |
Filter
Description: Restrict the selectable records based on criteria
API Information
Attribute Label | Attribute Name | Attribute Type | Accepted Values |
Filter | lookup_filter | filter | See Below |
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.
{
"attribute_name": "lookup_filter",
"value": [
"AND",
{
"field_name": "bag_size",
"condition": "not like",
"field_value": "small"
},
[
"OR",
{
"field_name": "zipper_count",
"condition": ">",
"field_value": "145"
},
{
"field_name": "receipt_count",
"condition": "is not null",
"field_value": ""
}
]
]
}
In SQL, this would look like:
(bag_size Not Like small) AND ((zipper_count= 145) OR(select_widget is not
Null))
Below symbols that can be used in the condition object.
Condition | Symbol |
Equal to | "==" |
Not Equal to |
"!=" |
Greater than | ">" |
Less Than | "<" |
Greater than or equal to |
">=" |
Less than or equal to | "<=" |
Like | "like" |
Not Like | "not like" |
Is NULL | "is null" |
Is not NULL | "is not null" |
Max
Description: Set the limit for how many lookup records to show
API Information
Attribute Label | Attribute Name | Attribute Type | Accepted Values |
Max |
lookup_limit | number | Any number 1 or above |
Read Only
Description: Set to true prevents a selection from being made
API Information
Attribute Label | Attribute Name | Attribute Type | Accepted Values |
Read Only | lookup_read_only | boolean | true | false |
Sorting
Description: Allows you to choose elements and sort them by ascending or descending order.
API Information
Attribute Label | Attribute Name | Attribute Type | Accepted Values |
Sort | lookup_order_by | order_by | See Below |
In the statement below, you will see 3 fields that are being sorted. The order from top to bottom of the value array is the priority. For example, bag_size will first order by asc, if there are duplicates, it will sort by zipper_count next, followed by weight. The field name is an element name and the field value has to be either 'asc' or 'desc'.
{
"attribute_name": "lookup_order_by",
"value": [
{
"field_name": "bag_size",
"field_value": "asc"
},
{
"field_name": "zipper_count",
"field_value": "asc"
},
{
"field_name": "weight",
"field_value": "desc"
}
]
}
Comments
2 comments
Hi Keith Garber,
Is it possible to set Filter based on element value like I want to link to "iformbuilder.username" function or element using that function
- currently, I have a table with 5000 records and its increasing daily same table it's linked to another table by lookup element is there any way for each user to download his own record only like:
user A submit 100 records to Form1 but total in form1 is 1000 when we make lookup or STS user A will download 1000 record I want to restrict user A to download 100 records instead of 1000 is it possible?
thanks
Hi Izzuddin,
Unfortunately that is not the current design on this feature, though that would be a great enhancement! The current design will download all records, and then the filter attribute can be set for the devices to filter the data based on certain conditions. For your example, with this feature you can still display only records that are equal to 'iformbuilder.username', however it would download all the records during the sync. Let us know if you have any questions.
Cheers,
Keith
Please sign in to leave a comment.