← Course Home
Okta Certified Workflows - Specialty · Part I

Building Flows

43% of Part I — the exam's largest section, split across 4 modules.

Building Flows · Module 3

Sub-topic: Boolean Logic & Operators

this deck covers 2 of 4 sub-topics in this module

↑ Module 3 Overview

The Scenario

"Use Boolean logic and operators to evaluate and interact with your data"

Every conditional branch in a flow eventually needs a true/false decision. Okta Workflows gives you one dedicated function for this: Expression.

The Mechanism

The Expression function lets you "build a True or False expression by combining operators and values that you type with fields that you drag and drop in." At runtime the whole expression evaluates to a single true/false output.

Logical operators: and (all true), or (any true), not (inverts), xor (true only if exactly one side is true). Use parentheses to group sub-expressions.

Comparisons & Extras

== equal   != not equal   > greater than   >= greater/equal
< less than   <= less/equal
# starts a comment (ignored at evaluation)

Math operators are also valid inside an Expression (see the Formula function for the full math operator/function list). Example from the docs: true and (true or false) and (4>pi). Fields from earlier in the flow can be dropped in anywhere a value is expected.

How Non-Boolean Inputs Coerce

When a field isn't already True/False: a Number evaluates false only when it's 0 (otherwise true); a Text field evaluates false when it's null or the literal string "false" (otherwise true); a Date field converts to a timestamp for use in comparisons.

The Gotcha

Straight from the docs: "Text comparisons are currently not supported inside a True/False Expression." Okta says they're working on it, but for now, if you need to compare two pieces of text, you must use the separate Compare function instead of trying to do it inside Expression.

One Line To Remember

Expression combines and/or/not/xor with == != > >= < <= (plus math operators and # comments) into a single true/false output; numbers are false only at 0, text is false only when null or "false" — but text-to-text comparisons aren't supported in Expression, so use Compare for those.

Source: help.okta.com — Expression (ext-boolean-method-expression)