AiondaAionda

Formula reference · Logic and conditions

CASE

Compare one value with alternatives and return the first matching result.

English · 23 November 2026

Review edition — editorial review is not yet complete.

Back to the function catalog

What it does

Compare one value with alternatives and return the first matching result.

Syntax

CASE(value, match1, result1, match2, result2, ..., fallback)

Square brackets mark optional arguments; omit the brackets. Separate arguments with commas, quote text and use a point for decimals.

Arguments, in order

ArgumentMeaning
valueValue to compare.
match1, result1First comparison value followed by its result.
match2, result2, ...Optional further match/result pairs, checked in order.
fallbackValue to use if no match succeeds; include it explicitly.

Returns: Type of the selected value.

Worked examples

Example 1

Formula

CASE("won", "new", 10, "won", 100, 0)

Result

100

Example 2

Formula

CASE("unknown", "won", 100, 0)

Result

0

Quotes in the result indicate text; \n indicates a newline. Date results use ISO notation. The application may display dates and numbers differently according to the selected field type and interface language.

Behaviour and limits

The registry permits 3 or more arguments, but a complete call with one pair and a fallback has 4. With no fallback and no match the result is blank. Match pairs must stay together.

Use it with your fields

Replace example values with the relevant field API names when needed. A record formula uses names such as amount; a flow expression uses its context, such as $Datensatz.amount. Use your actual API names and a compatible return type. See expression basics and flows.