IfCase Function

  • Updated

The IfCase function compares a test value against a list of values, returning the result from the first matching pair.

Syntax

 

The IfCase function compares a test value against a list of values, returning the result from the first matching pair.

 

IfCase(expression, testValue1, returnValue1, testValue2, returnValue2, ..., defaultReturn)

 

 

Arguments:

 

 

 

expression

Expression - The value to check equality against each test value.

 

 

testValue

Any

 

 

returnValue

Any

 

 

defaultReturn

Any - The default return value, if none of the tests match.

Remarks

  • Example: IfCase(expr, 1, "One", 2, "Two", 3, "Three", "1,2, or 3 only please") returns "Two".

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.