Other Functions

nz()

nz serves primarily for Formula Results. Operator expressions will only be evaluated if all operands are available (are not NULL). For example the formula T2-T1 will only be evaluated if the participant has both times T1 and T2. If you would like to evaluate an operator expression when operands are not available you will need the nz function which returns 0 if its parameter does not exist (is NULL). For example in case of net timing, you may want to calculate the net time even if the start time does not exists. For this you can use the following expression:

T2-nz(T1)

min()

min can have an arbitrary number of parameters and returns the minimum value of them.

min(2;3;1;5;6) - returns 1

 

min([YearOfBirth];[Bib]) - returns the minimum of year of birth and bib number

max()

max has an arbitrary number of parameters and returns the maximum of them

max(2;3;1;5;6) - returns 6

 

max([YearOfBirth];[Bib]) - returns the maximum of year of birth and bib number

first()

first() takes an arbitrary number of parameters and returns the first parameter (according to the sequence they are listed) which is not null. 

first(T11;T12;T0) - returns T0 if both T11 and T12 are zero or will return the first result which is not null.

last()

last() takes an arbitrary number of parameters and returns the last parameter (according to the sequence they are listed) which is not null. 

last(T11;T12;T0) - will return T0 even if T11 and T12 are not null. 

table()

The table function when used in Formula Results returns a value from the table. The parameters are the four table indexes, for example:

table([Rank1];0;0;0) - may return some point values from the table

Setting()

The first and only paramter of the Setting function is the name of a setting. The function will return the value of the setting. This can now be done by entering fields directly from Event Data Fields.

Setting("EventName") - returns the name of the event

GetSex()

GetSex returns the sex entry from the data base of first names:

GetSex("Frank") - returns m 

GetSex("Susan") - returns f 
GetSex("Andrea") - returns f/m (mostly female, in Italian male)

translate()

translate serves to translate the gender of a participant to a word in another language. If the first parameter is 'f' ('m', 'a'), the second (third, fourth) parameter will be returned. If the first parameter is neither 'f' nor 'm' nor 'a', the first parameter will be returned. You can use this expression:

translate([Sex];"Women";"Men";"Agender")

Translate is equivalent to:

translate(a; b; c; d) := switch([a]="f";[b]; [a]="m";[c]; [a]="a";[d]; 1;[a])

Rank()

Rank(x) can be used to call the place of the participant according to the ranking definition for X where X can be a calculation formula. RankP(x) can also be used to return the rank with a period after.

For example:

Rank(TLastID(a;b)) - Returns the value for the Rank with the ID which matches the value for TLastID(a;b).

 

RankMax()

RankMax(x) returns the number of participants who have been ranked in the same group according to the ranking definition for X where X can be a calculation formula. 

e.g. 

RankMax(TLastID(a;b)) - Returns the number of participants who have been ranked in the same group for the Rank with the ID which matches the value for TLastID(a;b).

Text()

To display the value of a field (e.g. [Contest.Name] or [Event.Name]) in the correct language in Output Lists, e-mails/sms, Certificates etc. use the Text() function.

Text([Field];"language code")

The corresponding field will be displayed in the selected language, e.g. Text([Contest.Name];"en") returns the English Contest name, whereas Text([Contest.Name];"de") returns the German Contest name.

Click here for more information where to use the Text() function and a list of available language codes.

ChangeLink()

The ChangeLink() function is used with Registration Forms of the self-service type to generate the unique URL for each participant to access their self-service. 

This URL will contain the form name, a unique key for the form, an ID for the participant and a key unique to the participant. 

The form name is passed as a parameter, by default the URL and self-service form will be hosted on the my.raceresult page for the event. 

ChangeLink("SelfService") - returns the unique URL for the self-service registration form SelfService

An second parameter can optionally be passed to change the destination URL, this can be used to create your own custom URL for embedding the self-service form. 

ChangeLink("SelfService"; "my") - returns the default my.raceresult URL

ChangeLink("SelfService"; "events") - returns a URL which directs to the events.raceresult server

ChangeLink("SelfService"; "www.mywebsite.com/event/reg") - returns a URL with the specified URL, the query parameters will be appended directly after, including the "?"

When using your own website destination, you must also ensure to embed the registration form using the Website Integration

To send the ChangeLink URL to participants, you can include the relevant ChangeLink() function in your email template, within square brackets [ChangeLink("SelfService")]. In the first parameter, specify the name of the self-service form to which you want to grant access. Additionally, in the second parameter, define the hosting page where you want the form to be opened. It's important to note that the second parameter can be omitted if not needed.