Functions

CHOOSE

Selects a value based on an index. Returns the item in a list based on the index passed. If the index is too large it will return NULL.

Syntax

string CHOOSE(int? index, params string[] values)
int? CHOOSE(int? index, params int?[] values)
double? CHOOSE(int? index, params double?[] values)
object CHOOSE(int? index, params object[] values)

Example

CHOOSE(ProductID, "One", "Two", "Three","Sausages")

Will return "One" for ProductID 1, "Two" for ProductID 2, "Three" for ProductID 3 and "Sausages" for ProductID 4.