Skip to content

Building conditions ​

Three places in ApptiveGrid expect a condition — an expression that ultimately evaluates to true or false: a block's conditional visibility, the transition between two Flow steps, and the filter.

This page shows the building blocks and how the three dialogs handle them.

Comparing ​

ConditionExample
equal · not equalfieldValue('status').isEqualTo('Open')
greater · lessfieldValue('quantity').greaterThan(10)
greater/less than or equalfieldValue('quantity').greaterThanOrEqual(10)
containsfieldValue('title').contains('Invoice')
begins with · ends withfieldValue('number').beginsWith('INV-')
empty · not emptyfieldValue('orderNumber').isNotEmpty()
true · falseformValues.get('terms').isTrue()
before · after (date)fieldValue('deadline').before(today())
list containsfieldValue('tags').includesAnyOf('urgent')

Which condition is allowed depends on the type of the value on the left — the full list by type is in the function reference.

Combining multiple conditions ​

There are no keywords. And and or are functions layered on top of a condition:

formValues.get('age').greaterThan(17).logicalAnd(formValues.get('terms').isTrue())

For more than two conditions, you keep chaining — the interface does the same:

a.logicalAnd(b).logicalAnd(c)
MeaningSyntax
and.logicalAnd(…)
or.logicalOr(…)
not.isFalse()

Mixing AND and OR within one rule

Technically it's allowed, but the interface can then no longer break the expression down into rows — you edit it only as a whole. Stick to one connector type per rule. If you need both, an extra step or an extra block is usually the clearer solution.

Branching with if ​

if is the language's only branch. It sits after the condition and returns one of two values:

fieldValue('quantity').smallerThan(5).if('reorder', 'ok')

That makes if well suited to Formula columns — for example, a traffic-light status as text. For visibility and Flow transitions you don't need it: the condition alone is enough there.

Conditional visibility of blocks ​

The simple selection of Field, Condition, and Value covers eight conditions and writes the expression for you:

SelectionExpression generated
is empty · is not emptyformValues.get('key').isEmpty() · .isNotEmpty()
is true · is false.isTrue() · .isFalse()
is equal · is not equal.isEqualTo('value') · .isNotEqualTo('value')
is greater than · is less than.greaterThan(5) · .smallerThan(5)

is true and is false only appear for a Checkmark block. Numbers are inserted without quotation marks, everything else with them.

The Advanced section below shows the expression and lets you edit it. As long as it matches the simple form, both views stay in sync; as soon as you combine something, only the text field continues to work.

Try it out in the editor

Next to the visibility rule, the editor shows Currently visible or Currently hidden — for the values currently in the input blocks. Enter test values and watch it switch. That's the fastest check, without publishing anything.

→ Conditional visibility

Flow transitions ​

The Only continue if … dialog on a connection between two steps builds the condition from rows:

  1. At the top, choose All conditions met (AND) or At least one condition (OR).
  2. Each row consists of Select value …, Select condition …, and a comparison value.
  3. Add condition adds a row, the cross removes it.

Choose the value first, then the condition

The list of conditions depends on the type of the left-hand value. Pick the value first, and only the matching conditions remain — for a date, for instance, before and after.

The dialog gets the type from the last test run. Without a test run it's Undefined, and the list shows every condition for every type. → Testing Flows

In the rows, you don't add any quotation marks: for text and dates, the dialog adds them for you.

Under Advanced logic is the full expression as text. Write connections there that the rows can't express — and the normal rules apply there too, including quotation marks. The hint in the dialog explains when the input takes effect:

Applied when you leave the field or click Save.

Two messages can appear:

MessageMeaning
Unrecognized expressionThis row can't be read as value-condition-value — edit it under Advanced logic
This expression mixes AND/OR …The rows are locked; only the full expression applies now

→ Router and Parallel

Filter ​

In a View, you build filters exclusively through the interface — field, condition, value. ApptiveGrid translates that into an expression itself; there's no input field for custom expressions there. → Filtering, sorting, grouping

It's different in a Flow step with a filter: there, the value selector additionally offers Expression. That lets you compare a field not against a fixed value, but against a computed one — for example, the result of a previous step.

A condition that doesn't work out filters the entry away

If a filter expression produces an error, nothing, or something other than a boolean, the entry is treated as not matching — it disappears from the result. An empty list is therefore a typical sign of a broken expression, not necessarily of missing data.

Common conditions ​

GoalCondition
Extra field only for "Other"formValues.get('category').isEqualTo('Other')
Range from age 18formValues.get('age').greaterThan(17)
Continue only with consentformValues.get('terms').isTrue()
Two conditions at onceformValues.get('age').greaterThan(17).logicalAnd(formValues.get('terms').isTrue())
Only when a field is filled instep('<step id>').output.get('email').isNotEmpty()
Overdue entriesfieldValue('<deadline>').before(today())
Everything except one statusfieldValue('<status>').isNotEqualTo('Done')

Next ​

Was this page helpful?