User-Defined Fields / Functions

Creating your own Fields and Functions allows you to quickly and easily call specific data without creating a long expression each time. User-Defined Fields/Functions are normally used with other data fields, or are used to return the same for every participant.

Some default User-Defined fields are available when creating a new file, such as MaleFemale which converts Gender to the full gender label. These default fields can be updated as you prefer. 

When creating User-Defined fields the Expression must be formatted as a RACE RESULT 14 Expression

When writing functions which should take additional parameters then the field name should use brackets around a semi-colon separated list of identifiers (e.g. Function(x;y) creates a function with 2 parameters x and y). 

Parameters can be accessed inside the function by wrapping them in square brackets (e.g. [x] and [y]).

e.g. YesNo(x) - if([x];"Yes";"No") is normally used with Check Box values to return "Yes" or "No" in an Output List if the value of [x] is 1 or 0. 

It can also be useful to write a note for each function to describe its purpose or how it should be used.