Using Filters in the Master Data Selector Input Element
A Filter is a condition built using operators and operands.
The Master Data Selector input element is populated with Data based on the value produced by the Filter execution. It can be used to select a set of records based on some criteria.
There are three categories of operators available to build Filters:
Category | Operators Available | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Relational Operators | These operators enable comparisons to be made. They are used in condition testing.
| ||||||||||||||
Arithmetic Operators | These operators are used to build arithmetic expressions.
| ||||||||||||||
Logical Operators | These operators are used to combine relational operators to build more complex conditions. The result of the operation of a logical operator is a Boolean value, either true or false.
|
The operands in a Filter can be:
Constant values.
Variable values ( Variables set at the template level or step level can be referenced ).
Object values ( Values of the records in the object can be referenced ).
Expressions built using any or all of the above.
Note
Variables set at the Template level or Step level can undergo changes based on the actions performed in the previous Steps.
Using variables enables you to make a dynamic decision based on the value of the variable at the time of executing the Template.
Before using a value, you must specify the data type of the value.
![]() |
The following data types are available:
Data types | Description |
---|---|
VALUE_STRING | Character String Value. |
VALUE_NUMERICAL | Numerical Value. |
VALUE_LOGICAL | Logical Value. |
VALUE_REGEX | Regular Expression - A sequence of characters that specifies a search pattern in text. |
VALUE_DATE | Date value. |
OBJECT_VALUE | A property of the selected object. |
VARIABLE_VALUE | Value of a variable set at the template or step level. |
VALUE_LITERAL | System Specific Usage. Not available to use currently. |
To set a Filter:
Click
.These warnings will persist until the filter is set up accurately.
Note
You will see these warnings multiple times during the course of setting up the Filter. They may appear when you change the operands and / or operators.
They alert you when incompatible operands are used with an operator and ensure that a meaningful Filter is created.
Click 'OP_UNKNOWN'.
Choose an operator that suits your requirements. Here, the relational operator Less than is chosen.
Specify the data type and value of the first operand. Here, the first operand is a property of the object, BatteryVoltage.
Specify the data type and value of the second operand. Here, the second operand is a template variable, MaxVoltage.
The filter is set to choose the records that have the value of BatteryVoltage less than the value of the variable MaxVoltage. The dropdown list in the Master Data Selector step will be populated with data from these records.
Note
Remember to save the template after setting up your filter.
You can build your filter using the operators and operands available in Fieldlogs.
A list of useful filter configurations are presented below. This list is just a sample and is by no means exhaustive.
Filter Structure | Setting Up the Filter | ||
A logical operator with just one operand
| If the condition evaluates to true, the Master Data Selector input is populated. Otherwise, it is not populated.
| ||
A logical operator with just one operand
| The Master Data Selector input is populated with data that satisfy the condition.
| ||
A comparison operator with two operands
| The Master Data Selector input is populated with records that satisfy the condition.
| ||
A logical operator with two operands
| The Master Data Selector input is populated with records that satisfy the conditions 1 and 2.
| ||
A logical operator with two operands. Each operand in turn is another expression.
| The Master Data Selector input is populated with records that satisfy the either conditions 1 and 2 or conditions 3 and 4.
|
Note
You can use the Execution Preview to test your Filter.
![]() |