Sdílet prostřednictvím


SWITCH (Report Builder 1.0)

Evaluates a list of expressions, and returns the value associated with the first condition that returns TRUE. Switch can have one or more condition/value pairs.

Syntax

Switch(condition1, value1, …)

condition1

Indicates the condition to test.

value1

Specifies the value or expression that the item should be replaced with, if the condition is True.

Example

Formula

Result

SWITCH(Customer Type = "I", "Individual", Customer Type = "S", "Shop")

If the Customer Type is "I", the word "Individual" is displayed. If the Customer Type is "S", the word "Shop" is displayed.