Skip to content

The expression editor ​

You don't write expressions into a blank text field — you write them into an editor that helps along: it shows field names instead of ids, offers the right functions, and calculates the result as a preview.

Where it shows up ​

PlaceHow to get there
Formula columnUnder Formula in the field settings
Text field of a Flow stepClick an already-inserted value — the Edit an expression dialog opens for that block
Flow transitionIn the Only continue if … dialog, under Advanced logic

Blocks or text ​

An expression can be edited in two views. You switch between them via the menu next to the label:

Menu itemWhat you see
Show formula as textThe expression as plain text — for copying, pasting, and larger rewrites
Show formula as tokensThe expression as colored blocks — fields with their names, functions, values

The token view is the more readable one: instead of fieldValue('64f2a1c0…'), it shows the field name in blue. Either way, what gets stored is the same.

Use the text view for expressions from elsewhere

The easiest way to bring in an expression from this documentation or from another Grid is to paste it in the text view. Then switch back to tokens — if the conversion succeeds, the expression was valid.

Inserting values and functions ​

Below the input field is the picker, with several tabs:

TabContents
SearchThe Grid's fields, the operators, and the functions for the current type
FlowThe results of this Flow's steps, and the Flow variables
Date · Numbers · String · Boolean · CollectionEvery function of the respective type, regardless of the current expression

A click inserts the entry at the cursor position. In a Flow step's text fields, you can also drag values from the picker to the desired spot.

The Search tab changes as you type

It shows the functions for the type the expression is currently returning. After fieldValue('title') it shows text functions; after .isEmpty(), boolean ones. If you're looking for a function that isn't there, you usually have the wrong type in front of you — not the wrong spelling.

The operators + - * / only appear when the expression returns a number.

The Flow tab needs a test run

The step results come from the last test run. Without one, the tab stays empty and the editor says so too: You need to test the Flow first. → Testing Flows

Sample result and type ​

Below the input field is the Sample result — the expression evaluated against real data: in a Formula column, against an entry from the Grid; in a Flow, against the values from the test run. Above it is the detected type, e.g. Type: String.

The type is the more important of the two. It determines which functions are possible next, and in a Formula column, which result types are available under Display result as.

An empty sample result is not proof of anything

The sample result is calculated in the browser; the production evaluation runs on the server. The two don't always agree: a number of functions stay blank in the preview even though the same formula does calculate in production.

ExpressionPreviewIn the Formula column
(100 / 3).round(2)blank33.33
today().addDays(1)blanktomorrow's date
3.asString()blank3
'a,b,c'.match('[a-z]')blankevaluates

This mainly affects date calculations, rounding, and some conversions — and by extension the interface's relative date filters, which are exactly this kind of expression.

So rely on the type display instead, and check the result against a real entry or in a test run. That said, the reverse also holds: an expression that does show a result in the preview also works fine in production.

Applying and errors ​

The expression is applied when you leave the field or press Enter. If it can't be parsed, the message appears below the field — and the text you entered stays as plain text instead of being converted into blocks.

Blocks instead of text are the confirmation that the expression could be read. If your input stays unchanged, something is wrong.

The messages are in English and name internal type names; what they mean is listed under Syntax.

Grid fields in the HTML block and the JavaScript step ​

The HTML block and the Flow step JavaScript don't have an expression editor — they have a code editor. You can still insert Grid fields there too:

Press Ctrl + Space to insert Grid fields

The suggestion list shows the field names and inserts {{fieldValue('<field id>')}} — with curly braces, because these editors mix text and expressions. The same list appears as soon as you type field.

Next ​

Was this page helpful?