Meta Expressions
Definition of Meta Expressions
Meta expression in FieldPro is a powerful tool used to retrieve data from different item attributes, activity variables and also workflow restrictions
It is utilized for:
Setting conditions
Computing (calculating field values)
Crafting item titles, activity report titles, and workflow report titles
Meta Expression Parameters
Meta expression parameters refers to variables or placeholders used to dynamically generate or manipulate data.
The meta expression builder contains different place holders as shown below:
Output - This is a section where the contents of the condition in the meta expression set will be displayed.
Add expression - section where you input the targeted attributes in the meta expression builder. Here you will need to select:
Title - the title of the meta expression being created
Target type - By default the target type is variable but there is an option to select SQL then input the SQL query
Scope - Depends on the attribute variable targeted can be from the Activity report/user/Client/Customer
Field - Dependant on the scope selected i.e. if the scope is Activity report the meta expression is selected based on activity report on the normal field
Default Value - allow default answers to attributes and avoid empty fields
Once done save the added expression
Operator - Logic or function to be used in the meta expression, as outline below:
And
Contains
Different from
Equals
Greater than
Greater than or equals to
Is empty
Is not empty
Lower than
Lower than or equal
Or
Return of the meta expression condition set - True or False
In the meta expression the "Add Inner Group" and "Add Group" options serve different purposes and affect how expressions are structured and evaluated.
Add Inner Group - creating a new group at the same level as the current one. This means that the new group is a sibling to the current group within the expression hierarchy.
Add Group - option allows you to create a nested group within the current group. This means that the new group is a child of the current group, creating a hierarchical structure.
How to use meta expression
The title is defined in lower case automatically.
The title should be something you can reuse later on in the configuration by typing @
Define the scope,
The scope options define the context in which meta expressions can be applied, ensuring they are used only where relevant.
Below are the possible scope options and their descriptions:
Item: Refers to any attribute of the selected item. Meta expressions in this scope will only appear when an item is selected.
Item Cell: Specific to matrix questions, this refers to any attribute of the selected item within a matrix. These expressions will only be available in the context of a matrix question.
Matrix Cell: Pertains to matrix questions and refers to any sub-question variable within the matrix. Meta expressions here will appear only for sub-question variables in a matrix.
User: Refers to any attribute of the mobile user, such as their user role. These expressions will appear in contexts where user attributes are applicable.
Client: Relates to any attribute of the client. Meta expressions in this scope are shown only where client data is relevant.
Customer: Refers to any attribute of the selected customer. These expressions will only be visible when a customer is selected.
Note: Meta expressions are dynamically displayed and will only appear in contexts where they are applicable to avoid confusion and ensure relevance.
When selecting a single choice attribute, you will see the different options available after in selection
To view/edit the contents of the meta expression/condition, just click on it, for a detailed display.
Updated on: 19/11/2024
Thank you!