SmartFilters
SmartFields give you the values in your flow – the customer's number, the response status code, the line amount. A SmartFilter turns those values into a yes/no answer: the Decision step's Condition and the Find Records step's Smart Filter are both SmartFilters. To compute a number from your values instead, see SmartFormulas.
A SmartFilter is a single boolean expression made up of comparisons, joined with & (AND) and | (OR), with ! for negation and ( ) for grouping. SmartField tokens ({{customer.no}}, {{httpRequest.statusCode}}, …) are resolved first; the operators then run on the resolved text or numbers.
The SmartFilter builder
You rarely need to write this syntax by hand. A field that expects a SmartFilter – the Decision step's Condition, the While loop's Condition, the Find Records step's Smart Filter – shows the condition directly on the step's configuration as a line of clickable blocks, and you edit it right there:
- A comparison is two value boxes with the operator between them. Click the operator to pick a different one.
- Each side of a comparison is a full value editor. Type a literal, or use the buttons in the box to drop in a SmartField, a SmartFormula or a SmartDate. Click any of those to reopen its own builder and change it.
+adds another condition, joined with and or or. Three conditions joined the same way read as one line: A and B and C. Every bracketed group carries its own+inside its brackets, so you can extend a group and not only the end of the line, and a connector's menu offers Insert a condition here to grow the filter in the middle.- Mixing and with or always shows brackets, because AutoFlow evaluates a filter strictly left to right with no operator precedence – A and B or C would be ambiguous, so it is never written. Adding a condition with the other connector brackets it against the last one: from a = b and b = a, adding with or gives a = b and (b = a or c = b).
- You decide the brackets. Click a connector to change it (which brackets the pair it joins) or to Bracket these two; the ⋯ menu on a bracketed group offers Remove the brackets. Between them you can reach any shape: from A and B and C, bracketing the first pair and switching the outer connector gives (A and B) or C.
- The ⋯ menu is on every part of the line: on a single condition, on a bracketed group (at the end, inside its brackets), and on the line as a whole. It wraps that part in a not, removes it, and on a group also removes its brackets. Negating a group or the whole filter is how you write not (A or B).
Under the line, a status tells you whether the filter is complete – an empty box has to be filled before you can save.
The button at the end of the line opens the full SmartFilter builder page. It is the same editor with more room, plus a Test toggle at the top right: enter a sample value for each token and watch the whole condition reduce, step by step, to true or false.
Below the editor, Edit as text switches the whole filter to a plain text box – quicker for a long filter you already know how to write, and the way to paste one in. Back to the editor returns to the guided view; the text has to parse first, and if it doesn't you stay put with the reason, so nothing you typed is lost. Saving from the text view saves exactly what you typed.
A filter that was written by hand and does not fit this structure – for example one that combines three conditions at the top level without brackets – opens in the text view with a note. On a step's configuration, where there is no text view, it falls back to a plain text box. Either way nothing is rewritten behind your back.
The rest of this page is the underlying syntax – handy when you'd rather type a filter directly, or want to read one that already exists.
Comparison operators
Use these between two values – each side is a literal value or a SmartField token, written without surrounding quotes. The single exception is '', which means the empty string (see below).
| Operator | Reads as | Example | True when |
|---|---|---|---|
= | equals | {{httpRequest.statusCode}} = 200 | both sides are equal |
!= | not equal | {{customer.blocked}} != '' | the values differ |
> | greater than | {{order.total}} > 1000 | left is strictly greater |
< | less than | {{stock.qty}} < 5 | left is strictly less |
>= | greater or equal | {{order.total}} >= 1000 | left is greater or equal |
<= | less or equal | {{stock.qty}} <= 5 | left is less or equal |
~ | contains | {{description}} ~ urgent | right value appears anywhere in left |
^= | starts with | {{customer.no}} ^= C0 | left begins with right |
$= | ends with | {{file.name}} $= .pdf | left ends with right |
Numbers vs. text. Comparisons (=, !=, >, <, >=, <=) check both sides numerically when both parse as numbers, otherwise they fall back to text comparison. So {{order.total}} >= 1000 works whether the SmartField resolves to 1000 or 1.000,50. {{customer.name}} = Adatum works because both sides are text.
Don't put quotes around text. Write the literal bare – DE, not 'DE'. AutoFlow compares the operands exactly as written, so the quotes would become part of the value: {{customer.priority}} = 'A' resolves to A = 'A', which is false because A differs from 'A'. Write {{customer.priority}} = A instead.
The empty string. The one place quotes are used is the empty string: two single quotes – '' – mean "empty". {{customer.blocked}} != '' is the idiomatic "is the customer blocked?".
Combining conditions
| Operator | Reads as | Example |
|---|---|---|
& | AND | ({{order.total}} >= 1000) & ({{customer.country}} = DE) |
| | OR | ({{customer.priority}} = A) | ({{order.urgent}} = true) |
! | NOT | !({{customer.blocked}} = '') |
( ) | grouping | ({{a}} = 1 | {{a}} = 2) & ({{b}} != '') |
Wrap every comparison in its own parentheses when you join it with & or | – write (A) & (B), never A & B. The evaluator has no operator precedence of its own: it splits an expression on the first comparison operator it finds, so an unparenthesised A & B is misread (the & ends up inside one operand) and the condition silently evaluates wrong – often always true or always false. Parentheses reduce each comparison to a single true/false first, and only then are & / | applied. ! likewise always sits in front of a parenthesised group: !(…). (The builder always parenthesises correctly, so this only bites when you type a filter by hand.)
A few full examples
{{httpRequest.statusCode}} = 200
Did the request succeed?
({{customer.blocked}} != '') & ({{order.total}} > 0)
The customer is blocked and the order isn't empty.
({{file.name}} $= .pdf) | ({{file.name}} $= .PDF)
Filename ends with .pdf (case-sensitive – cover both spellings, or normalise upstream).
!({{salesHeader.status}} = Released)
Anything except a released sales document.
Tips
- Don't quote text values. Write literals bare –
DE,Released,200. Surrounding quotes become part of the value and the match fails (Adatum≠'Adatum'). The only quoted form the evaluator understands is'', meaning the empty string. - Parenthesise every comparison you combine.
&and|only work on parenthesised comparisons –(A) & (B). See "Combining conditions" above. - Keep it short. If the expression is hard to read, push the work into a Parser step that builds a clean boolean SmartField, and let the Decision/Find Records step reference that field.
- Strings are case-sensitive. Match the casing the data actually has, or normalise both sides through a Parser step first.
Where SmartFilters show up
| Step | Field |
|---|---|
| Decision | Condition |
| Find Records | Smart Filter |
SmartFilters also power the {#if …#} condition in SmartControls.