Control Functions

if()

The function if (or iif ) has three parameters: if the first parameter is not 0/true, the second parameter will be returned, otherwise the third parameter. For example:

if([Checkbox];"yes";"no")

If the additional checkbox field is checked, the expression returns yes and no otherwise.
The third parameter can also be omitted. Then, the function returns NULL in the false case.

switch()

switch has an arbitrary number of parameters, which are alternating a condition and a result. If the first parameter is true, the result of the second parameter will be returned. Otherwise, if the third parameter is true, the result of the fourth parameter will be returned, and so on. For example:
switch([Bib]<100;"A";[Bib]<200;"B";[Bib]<300;"C")
If the bib number is less than 100, A will be returned. If the the bib number is less than 200 (but greater or equal 100), B will be returned. If the the bib number is less than 300 (but greater or equal 200), C will be returned. If the bib number is greater or equal 300, NULL will be returned.

choose()

choose has an arbitrary number of results. The first parameter is an integer which is the index of the parameter that will be returned. For example:

 

choose(4;"A";"B";"C";"D";"E") - returns the fourth parameter after the index: D

 

This example converts the status of participants (encoded as number) into a text:

choose([Status]+1;"regular";"o.o.c.";"DSQ";"DNF";"DNS";"n/a")