Filters allow for more efficient sorting of data and are a great tool when it comes to displaying or retrieving concise and relevant data. The type of Filter here uses Ncalc query language much like Expressions. Currently this type of Filter is used in Workflow. Some of these require configuration in App Studio, hence if you don't have access to such you may need to contact your administrator.
Generic Filter Structure
- [FieldIdentifier] Ncalc Operator 'Value'
Note: NCalc filtering allows for some expression-based filtering. For example '[DateField] = dateNow()' is a filter that could be applied to a Scheduled Workflow.
Think of filter expressions as conditions that are either met or not. Filter building is based on the reference of a particular field or fields and how they compare to a given value will determine if the Workflow triggers. It is only in the case where the overall condition is met that the Workflow will be triggered.
Most common Ncalc operators:
- <> for Not equal to
- = for Equal to
- && for And
- || for Or
- > for Greater than
- >= for Greater than or equal to
- < for Less than
- <= for Less than or equal to
Note: If suited to the use case, you can build more complex Filters or sets of conditions to be met / not. This is done by using and / or in the strings with brackets and follows boolean logic to derive an overall value of true or false.
E.g.
([FieldIdentifier1] = 'Value' && [FieldIdentifier2] = 'Value') || [FieldIdentifier3] <> 'Value'
In the above, the Filter conditions will be met if Field1 and Field2 both equal their specified values OR if Field3 is not equal to its specified value.
Different Values
The given value will vary depending on what type of Field is initially referenced, these can be number values in the more traditional sense or text ones:
- [TextFieldIdentifier] - Quote the desired text value: 'Text'
- [NumberFieldIdentifier] - Quote the desired number, without quote marks: 1
- [BitFieldFieldIdentifier] - Quote the desired Boolean value, without quote marks: true or false
- [DateFieldIdentifier] - Quote the desired date value: dateParse('2021-01-01T00:00:00Z')
- e.g. [FieldName] > dateParse('2021-01-01T00:00:00Z')
NOTE: You can also use '' for the null case on text based values, to test whether a Field is empty or not. (See Template Visibility example below)
Form Rules, Report Base Filters & Application Exceptions - Templated Reports and URL Fields
For all of the above, OData, a different type of Filter query language is used - to read all about this and its uses on Softools please see here.
Comments
0 comments
Please sign in to leave a comment.