Switch

Switch(Boolean[], Array)

The elements in the two parameters corresponding with each other. This function evaluates the elements in the first parameter from left to right, and returns element associated with the first element to evaluate to True. For example,

Switch([1, 2, 3], [a, b, c])

if 1 is true, Switch returns a. If 2 is true, Switch returns b. If 3 is true, Switch returns c.

Parameters

Return value

One of the elements of the parameter array. The type of the returned value is the same as the element in the array.

Example

Insert the following function into the Detail section of a report,

Switch([@"Customers_Customer ID"< 5, @"Customers_Customer ID" > 50,true],["small", "large", "medium"])