Filters are an efficient way method for sorting and cutting out data. Ncalc filters can most commonly be found for the filter node in Workflows. This filter string follows the same syntax as expressions for fields and has an as-you-type validation, which will return an error for a syntactically invalid expression.
Basic Filter Structure:
[FieldIdentifier] Function 'Condition to Meet'
Filter expressions acts as conditions in which it would return whether a condition has been met or not. Below are the different functions that can be used in this filter.
- Not equals to: <>
- Equal to: =
- Greater than: >
- Equal to or greater than: >=
- Less than: <
- Equal to or less than: <=
E.g.
([FieldIdentifier1] > 0 && [FieldIdentifier2] = 'Value2') || [FieldIdentifier3] <> 'Value3'
In the above, the Filter conditions will be met if Field1 is greater than 0 and Field2 equals Value2, or if Field3 is not equal to value 3.
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 values:
- [TextFieldIdentifier] - Quote the desired text values: ‘Text’
- [NumberFieldIndentifier] - 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('2022-01-01')
- e.g. [FieldName] > dateparse('2022-01-01')
- [PersonFieldFieldIdentifier] - Quote the desired text value and use the text backing value, 'Joe Bloggs'
- e.g. [FieldName_Text] = 'Joe Bloggs'
Comments
0 comments
Please sign in to leave a comment.