Functions

Functions add certain functionality to expressions. After the function name, the parameters follow separated by semicolons in parentheses:

 

FunctionName(parameter1; parameter2; parameter3; ...)

 

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") 

String Functions

left()

left has two parameters, a string and number n, and returns the first n characters of the string. For example:
left("race result";4) - returns race
left([LastName];1) - returns the first character of the last name

right()

right has two paramters, a string and a number n, and returns the last n characters of the string. For example:
right("race result";4) - returns sult
right([LastName];1) - returns the last character of the last name

mid()

mid has three parameters, a text and two numbers m and n. It returns n characters of the string, beginning at the m-th character. For example:
mid("race result"; 6; 3) - returns res

instr()

instr returns the position of the first occurence of a substring in a string. The first parameters determines where to start searching.
instr(1;"race result";" ") - returns 5
instr(2;"ab";"a") - returns 0, since there is no a if searching from the second character on.

instr2()

instr2 is similar to instr(), but considers áàä etc. as a, éèê etc. as e, and so on
instr2(1;"ráce result";"a") - returns 2

SplitString()

SplitString takes 3 parameters - a string, a delimeter and a number n.

The string is split at each occurence of the delimeter, then the nth object is returned, for example:

SplitString("a,b,c,d"; ","; 3) returns c

val()

val converts a string into a number. For example, this function can be used to sort numerically by the values in an additional text field.
val([ATF1]) - can be used for numerical sorting by ATF1
val("3")<val("20") - returns 1 (true)
"3"<"20" - returns 0 (false due to text comparison)

len()

len returns the length of a text.
len("race result") - returns 11.
len([LastName]) - returns the length of the last name

lcase()

The function LCase converts all characters to lower case.
UCase([LastName]) & ", " & LCase([FirstName]) - returns for example DOE, john

ucase()

The function UCase converts all characters to upper case.
UCase([LastName]) & ", " & LCase([FirstName]) - returns for example DOE, john

trim()

trim removes white spaces at the beginning and end of a text and returns the remaining string:
trim(" Hello World   ") - returns "Hello World"

string()

string has two parameters, a number n and a text. It repeats the text n times.
string(3; "Run! ") - return "Run! Run! Run! ".

replace()

replace replaces parts of a text by another text.
replace("race result"; " "; "-") - returns "race-result".

reduceChars()

reduceChars has two strings a and b as parameters and returns only those characters of a that are part of b:

 

reduceChars("race result 12 software 2020"; "0123456789") - returns 122020

 

removeAccents()

removeAccents removes accents from any letter:
removeAccents("Café au Lait") - returns "Cafe au Lait"

chr()

Chr has one parameter and converts an ASCII code to the corresponding character.
chr(65) - returns "A"

asc()

Asc has one parameter and returns the ASCII code of the first character of the parameter.
 asc("A") - returns 65.

ordinal()

ordinal returns English ordinal numbers:
ordinal(1) - returns "1st"
ordinal(3) - returns "3rd"
ordinal(15) - returns "15th"

similarity()

The function similarity returns the similarity of two strings as value between 0 and 1.
similarity("Hansaplast";"HansPlasta") - returns 0.625
similarity([LastName];[LastName]) - returns 1

CorrectSpelling()

The function CorrectSpelling converts the characters of the first/last name to upper and lower case as expeceted: the first character will be in upper case, all other characters in lower case. The words "de", "der", "und", "van", "von" and "zu" always will be in lower case.
CorrectSpelling("max VON uNd zu mustERMann") - returns Max von und zu Mustermann

stringCount()

stringCount takes two strings a and b. It returns how often b appears in a

 

stringCount("race result 12"; "r") - returns 2

 

Mathematical Functions

int()

int returns the integer part of a number, for example
int(6.7) - returns 6

sqrt()

sqrt returns the square root of a number, for example:
sqrt(9) - returns 3

quersumme()

quersumme returns the cross sum of a number, for example:
quersumme(423) - returns 9

abs()

abs returns the absolute value of a result or a calculation, by converting negative numbers to positive numbers:

 

abs(-9) - returns 9

 

abs(18) - returns 18

Example:

in a regularity race where rankings are based on the precision of each participant in a specific timing point based on a specific time-table, you may want to calculate the absolute difference between the theoretical time and the real time and then rank participants from the more precise to the less precise.

By using abs(), negative times are treated as positive, and this makes it easy to evaluate the best performance of each athlete.

 

round()

The round functions rounds a number. The second parameter is optional and defines how many decimal places shall remain:
round(3.149) - returns 3
round(3.149;2) - returns 3.15

speed()

The function speed calculates the speed in km/h (metric units) or mph (imperial units) according to the units of measurement in your basic settings, for example

speed([Time10.Decimal])

If the distance shall not be the length of the contest, it can be added as a second paramter, this will use the unit from your contest settings.

The third parameter is optionally the unit as either:
meters - "m"
kilometers - "km"
miles - "miles"

For example

speed([Time10.Decimal]; 5)
speed([Time10.Decimal]; 5000; "m")

Using the format function the output can be formatted easily:

format(speed([Time10.Decimal]); "s.k") & " mph"

pace()

The function pace calculates the pace in minutes per kilometer (metric units) or minutes per mile (imperial units), according to the units of measurement in your basic settings, for example

pace([Time10.Decimal])

If the distance shall not be the length of the contest, it can be added as a second paramter, this will use the unit from your contest settings.

The third parameter is optionally the unit as either:
meters - "m"
kilometers - "km"
miles - "miles"

For example

pace([Time10.Decimal]; 5)
pace([Time10.Decimal]; 5000; "m")

Using the format function the output can be formatted easily:

format(pace([Time10.Decimal]); "m:ss") & " min/mile"

Result Functions

Result Functions are used to compare an individual participants results.

Most use the format TFunction(a;b) where a and b define the range of Result IDs which should be considered. 

e.g. TMin(1;10) - returns the minimum time from the Results with ID from 1 to 10

 Some functions have additional parameters which are explained with the function. There are further additional variations of each function which are also explained within. 

TCount()

TCount(a;b) counts how many times are entered in the results with ID a to b.

e.g. TCount(1;10) - returns how many times are entered in the Results with ID from 1 to 10

TSum()

The function TSum(a;b) calculates the sum of the times in the results with IDs a to b.

TSum(10;12) - equivalent to nz(T10)+nz(T11)+nz(T12)

The function TSum(a;b;c;d) retrieves all times in the results with IDs a to b, sorts them from smallest to largest and then calculates the sum of the best results from positions c to d.

TSum(10;15;1;2) - sums the two best times of the results 10 to 15.
TSum(10;15;3;3) - returns the third best time of the results 10-15.

TSum(a;b;c;d;1) corresponds to TSum(a;b;c;d), but sorts the times in descending order.

TMin()

TMin(a;b) returns the minimum time or value from results with ID a to b

e.g. TMin(1;10) - returns the minimum time from the Results with ID from 1 to 10

TAvg()

Tavg(a;b) calculates the average of the times in Results with ID from a to b

e.g. TAvg(1;10) - returns the average time of the Results with ID from 1 to 10

TMax()

TMax(a;b) returns the maximum time or value from results with ID a to b.

e.g. TMax(1;10) - returns the maximum time from the Results with ID from 1 to 10

TFirst()

TFirst(a;b) scans the results a to b and returns the first time entered (Lowest ID).

e.g. TFirst(1;10) - returns the time from the result with the lowest ID from Results with ID from 1 to 10

The function TFirst(a;b;c;d) retrieves all times in the results with IDs a to b and sorts them from smallest to largest.
It then only considers the cth best to dth best result and returns the first time of these (=lowest ID).

e.g. TFirst(1;10;1;3)  - Returns the result with the lowest ID from the smallest 3 times from Result IDs 1-10

TFirst(a;b;c;d;1) corresponds to TFirst(a;b;c;d), but sorts the times in descending order.

TFirst(a;b;0;0;0;c) scans the results a to b and returns the cth time entered.

e.g. TFirst(1;10;0;0;0;3)  - Returns the result of the 3rd result (according to Result IDs) which has been entered from Result IDs 1-10

TLast()

TLast(a;b) scans the results a to b and returns the last time entered (Highest ID).

e.g. TLast(1;10) - returns the time from the result with the highest ID from Results with ID from 1 to 10

The function TLast(a;b;c;d) retrieves all times in the results with IDs a to b and sorts them from smallest to largest.
It then only considers the cth best to dth best result and returns the last time of these (=highest ID).

e.g. TLast(1;10;1;3)  - Returns the result with the highest ID from the smallest 3 times from Result IDs 1-10

TLast(a;b;c;d;1) corresponds to TLast(a;b;c;d), but sorts the times in descending order.

TLast(a;b;0;0;0;c) scans the results a to b and returns the cth last time entered.

e.g. TLast(1;10;0;0;0;3)  - Returns the result of the 3rd from last result (according to Result IDs) which has been entered from Result IDs 1-10

T()

T(x) returns the value in result x as decimal value.

Avoid using the T() function for Formula Results - it creates major dependencies within your file!

See also TR(), TText(), TName().

DMaxMin()

DMaxMin(a;b;c) scans the results a to b and returns the maximum of times less than c, where c is a time value entered as seconds.

e.g. DMaxMin(1;10;3600)  - Returns the maximum time from Results 1-10 which is less than 3600s (1 hour)

Conversion Functions

urlencode()

urlencode encodes a string as URL.

urlencode("race result") - returns race%20result

NumberToWords()

NumberToWords(a;b;c) converts a number into English words. b will be added after the integer part, c will be added after the decimal digits.

NumberToWords([EntryFee];"Euro";"Cent") - returns the entry fee in words, e.g. eighteen Euro and twenty Cent

ZahlInWort()

ZahlInWort(a;b;c) converts a number into German words. b will be added after the integer part, c will be added after the decimal digits.

ZahlInWort([EntryFee];"Euro";"Cent") - returns the entry fee in words, e.g. achtzehn Euro und zwanzig Cent

TimeFromString()

The function TimeFromString is the counterpart of the format() function. It converts a time string into a number presenting the number of seconds:

TimeFromString("0:02:03,4") - returns 123.4

md5()

md5(x) calculates the MD5 hash value.

md5("race result") - returns "02185E816175C3FC6255140D2BE222C3"

crc7()

The CRC7 check is required for communication with a number of third-party devices. 

The result of the crc7() function is returned as a decimal value. 

crc7(2) - returns 34

 

Time and Date Functions

format()

The format functions formats a number (first parameter) according to a time format (second parameter). Example:

format(123.45; "h:mm:ss,k") - returns 0:02:03,4

date()

date() returns the current date for calculations:

[Event.Date]-[Date]  - returns the number of days to the date of the event

date(a) returns the current date formatted according to a:

date("dd/mm/yyyy") - returns for example 01/07/2014

date(a;b) returns the date b formatted according to a:

date("mm/yyyy"; [DateOfBirth]) - could return for example 05/1970

 

Date Formats:

d Day of Month (without leading zeroes)
dd Day of Month (with leading zeroes)
ddd Day of Month as Ordinal value
m Month (without leading zeroes)
mm Month (with leading zeroes)
mmm Month as short text (English & German only)
mmmm Month as long text (English & German only)
yy 2-digit Year
yyyy 4-digit Year
e Day of Week as number (1-7)
ee

Day of Week as short text (English & German only)

eee Day of Week as long text (English & German only)
a Day of Year
ww Week number
isoweek

Year and Week number

It is also possible to use basic Time Formats with date formatting.

now()

now() returns the current date and time for calculations:

now()-[Created]  - returns the number of days ago the participant has been created.

ElapsedTime()

ElapsedTime(time; format) creates a special string which will generate a running time on lists which shows the time elapsed since time.

If format is not given, HH:mm:ss will be used.

If format is expressed with a "-" sign, the ElapsedTime will show a countdown to time.

ElapsedTime will not work for multi-day events where the time goes over 24 hours. 

 

AgeOnDate()

AgeOnDate(yyyy;mm;dd) returns a participant's age on a specified date entered with 3 parameters; year month and day..

Check Functions

inRange()

inRange(a;b) returns 1 if the number a is within the number range b, e.g. "1-10;15".

inRange([Bib];"1-10;15") - returns 1 if the bib number is between 1 and 10 or equal 15.

isNumeric()

isNumeric checks if a string contains only the characters 0,1,2,3,4,5,6,7,8,9:

isNumeric("12323") - returns true

isNumeric("12W44") - returns false

isAlpha()

isAlpha checks if a string only contains the characters A-Z/a-z:

isAlpha("ASKdeo") - returns true

isAlpha("Ström") - returns false
isAlpha("K3") - returns false

hasChip()

hasChip(transponder) returns 1 if the given transponder code is assigned to the participant, and 0 otherwise.

hasChip("NUSPW44") - returns 1 or 0

The transponder can be assigned by the fields Transponder1, Transponder2 or by the Chip File.

ChipFileHas()

 ChipFileHas(transponder) returns 1 if the given transponder code is present in the Chip File, and 0 otherwise. 

ChipFileHas("ZABCD12") - returns 1 or 0

search()

search(a;b) returns 1, if all words of b occur in a.

search("This is a string with race and result"; "race result") - returns 1

search("the first three characters of the alphabet do not occur in this text"; "abc") - returns 0

isUCICode()

isUCICode checks if the first parameter is a valid UCI code:

isUCICode("GER19810312") - returns true

isUCICode("Ger13333") - returns false

isUCIID()

isUCIID() checks if the first parameter is a valid UCI ID:

isUCIID("98387437864") - returns true

 

isUCIID("ABCD123") - returns false

 

hasEntryFee(entryFeeID)

hasEntryFee(entryFeeID) returns 1 if the given EntryFeeID is applied to the participant, and 0 otherwise.

hasEntryFee(1) - returns 1 or 0

You can find the EntryFeeID under Main Window > Entry Fees.

This function can be used for example as a filter in Output lists, to see which participants a particular Entry Fee has been applied to.

isEligible()

IsEligible(a;b;c) returns 1 if the participant is eligible for the contest according to the date of birth ranges and, optionally, gender, and 0 otherwise. 

isEligible("01/01/2000") - checks whether the date 01/01/2000 is eligible for the current contest of the participant. 

The function can also take a year instead of date. 

isEligible(2000) - checks whether the year of birth 2000 would be eligible for the current contest of the particpant.

The second parameter is optional and can be used to also check whether the gender is eligible for the contest. 

isEligible([DateOfBirth];"m") - checks whether the current date of birth and the gender Male is eligible for the current contest of the participant. 

The third optional parameter can be used to define the contest ID. 

isEligible([DateOfBirth];[Gender];2) - checks whether the participant is eligible for contest ID 2. 

This function is useful for registration of relay teams where additional team members information may be stored in additional fields, but you still need to confirm their eligibility to compete. 

isValidEmail()

IsValidEmail() returns 1 if the string represents a valid email address, and 0 otherwise. 

isValidEmail("john.doe@gmail.com") - checks whether john.doe@gmail.com is technically a valid email address (not necessarily an existing one).

Inter-Record Functions

BunchTime()

BunchTime(rankID;resultID;offset) calculates the bunch time for cycling events. All riders in a group receive the time of the first rider of the group if there is no gap greater then offset (in seconds) between the riders. Otherwise a new group with a new bunch time will be started.

BunchTime(1;11;1) 

GapTimeTop()

GapTimeTop(resultID;rankID;text first;time format) calculates the gap time between a participant and the first participant. The resultID determines which result to consider; the rankID determines who is the first athlete; text first is the text to show for the first athlete; and time format specifies how to format the gap time. For example:

GapTimeTop(1;2;"--";"+m:ss,kk") 

Using the default Results (Result ID 1 = Finish Time) and Ranks (Rank ID 2 = MFRank) this would return the time behind from the gender winner based on finish time.

The third and fourth parameters can be omitted. "-" and "+HH:MM:ss,kk" are the default values.

GapTimePrev()

GapTimePrev(resultID;rankID;text first;time format) calculates the gap time between a participant and the previous participant. The resultID determines which result to consider; the rankID determines who is the previous athlete; text first is the text to show for the first athlete; and time format specifies how to format the gap time. For example:

GapTimePrev(1;3;"--";"+m:ss,kk") 

Using the default Results (Result ID 1 = Finish Time) and Ranks (Rank ID 3 = AGRank) this would return the time behind from the previous runner, in the same age group, based on finish time.

The third and fourth parameters can be omitted. "-" and "+HH:MM:ss,kk" are the default values.

GapTimeLast()

GapTimeLast(resultID;rankID;text last;time format) calculates the gap time between a participant and the last participant (max rank at the time of calculation). The resultID determines which result to consider; the rankID determines who is the last athlete; text last is the text to show for the last athlete; and time format specifies how to format the gap time. For example:

GapTimeLast(1;2;"--";"+m:ss,kk") 

Using the default Results (Result ID 1 = Finish Time) and Ranks (Rank ID 2 = MFRank) this would return the time to the last athlete of the same gender based on finish time.

The third and fourth parameters can be omitted. "-" and "+HH:MM:ss,kk" are the default values.

GapTimeNext()

GapTimeNext(resultID;rankID;text last;time format) calculates the gap time between a participant and the next participant. The resultID determines which result to consider; the rankID determines who is the next athlete; text last is the text to show for the last athlete; and time format specifies how to format the gap time. For example:

GapTimeLast(1;3;"--";"+m:ss,kk") 

Using the default Results (Result ID 1 = Finish Time) and Ranks (Rank ID 3 = AGRank) this would return the time ahead of the next runner, in the same age group, based on finish time. 

The third and fourth parameters can be omitted. "-" and "+HH:MM:ss,kk" are the default values.

TeamGapTimeTop()

TeamGapTimeTop(ResultNo;TeamScoreID; text first; time format) calculates the gap time between the time of a team and the first team. The ResultNo determines which result to consider (1 to 4); the TeamScoreID determines which team score will be considered; text first is the text to show for the first team; and time format specifies how to format the gap time. For example:

TeamGapTimeTop(2;1;"--";"+m:ss,kk") 

This would return the gap time of the second result in team score 1.

The third and fourth parameters can be omitted. "-" and "+HH:MM:ss,kk" are the default values.

TeamGapTimePrev()

TeamGapTimePrev(ResultNo;TeamScoreID; text first; time format) calculates the gap time between the time of a team and the previous team. The ResultNo determines which result to consider (1 to 4); the TeamScoreID determines which team score will be considered; text first is the text to show for the first team; and time format specifies how to format the gap time. For example:

TeamGapTimePrev(2;1;"--";"+m:ss,kk") 

This would return the gap time of the second result in team score 1.

The third and fourth parameters can be omitted. "-" and "+HH:MM:ss,kk" are the default values.

DCount()

DCount counts the number of participants fulfilling a filter (first parameter):

DCount("[Finished]") - returns the number of finishers
DCount("T101>0 AND [Contest]=1") - returns the number of participants registered in Contest 1, who have a result in Result 101

If your filter contains text values, you need to escape the quotes with more quotes. Examples:

DCount("[Gender]=""f""") - Returns the number of female participants
DCount("[Gender]="""  & [Gender] & """") - Returns the number of participants who are of the same gender as the considered participant.

Note that the aggregation functions are not very fast and should be used rarely.

DSum()

DSum sums up the values of a field (first parameter) of those participants fulfilling a filter (second parameter):

DSum("[Age]"; "[Finished]") - returns the sum of the ages of all finishers

Why the double quotes around the field names? Because the parameter is the name of the field that the function shall analyze!

Note that the aggregation functions are not very fast and should be used rarely.

DMin()

DMin determines the minimum of the values of a field (first parameter) of those participants fulfilling a filter (second parameter):

DMin("[Age]"; "[Finished]") - returns the minimum age of all finishers

Why the double quotes around the field names? Because the parameter is the name of the field that the function shall analyze!

Note that the aggregation functions are not very fast and should be used rarely.

DAvg()

DAvg calculates the average of the values of a field (first parameter) of those participants fulfilling a filter (second parameter):

DAvg("[Age]"; "[Finished]") - returns the average age of all finishers

Why the double quotes around the field names? Because the parameter is the name of the field that the function shall analyze!

Note that the aggregation functions are not very fast and should be used rarely.

DMax()

DMax determines the maximum of the values of a field (first parameter) of those participants fulfilling a filter (second parameter):

DMax("[Age]"; "[Finished]") - returns the maximum age of all finishers

Why the double quotes around the field names? Because the parameter is the name of the field that the function shall analyze!

Note that the aggregation functions are not very fast and should be used rarely.

DFirst()

DFirst returns the value of a field (first parameter) of the first participant fulfilling a filter (second parameter):

DFirst("[Lastname]"; "[Bib]=1") - returns the last name of the participant with bib number 1

Why the double quotes around the field names? Because the parameter is the name of the field that the function shall analyze!

Note that the aggregation functions are not very fast and should be used rarely.

DLast()

DLast returns the value of a field (first parameter) of the last participant fulfilling a filter (second parameter):

DLast("[Lastname]"; "[Bib]=1") - returns the last name of the participant with bib number 1

Why the double quotes around the field names? Because the parameter is the name of the field that the function shall analyze!

Note that the aggregation functions are not very fast and should be used rarely.

DConcat()

DConcat concats the (string) values of a field (first parameter) of those participants fulfilling a filter (second parameter).

DConcat can then be used for example to list all the participants with the same last name:

DConcat("#[FirstName] [LastName] [crlf]"; "[LastName]=""" & [LastName] & """")

DQuantile()

DQuantile calculates a quantile of the values of a field (first parameter) of those participants fulfilling a filter (second parameter):

DQuantile("[Time1.Decimal]"; "[Time1.Positive]"; 25) - calculates the 25%-quantile of the times in result 1.

Note that the aggregation functions are not very fast and should be used rarely.

DFunctions() explanation

DFunctions() can be tricky to write due to the escaped quotation marks in the function. The parameters used must be written as text strings, but then comparing participants in groups requires calling the field value in to the string. Below is an explanation of how to write DFunctions and how the quotation marks are escaped or how to write it using a full-text expression.

Standard Text String

The below function will return the count of all participants whose Gender and Contest match the considered participant.

DCount("[Contest]=" & [Contest] & " AND [Gender]=""" & [Gender] & """")
  • The first yellow quote opens a string of text and the second yellow quote closes it.
  • An ampersand is used to concatenate the yellow string of text with the value of [Contest].
  • Since the value of [Contest] is a number and NOT a string of text, we do not need to surround the value with quotes. The resulting concatenated string is shown below if, for example, the considered participant was in contest 1.
[Contest]=1
  • The first orange quote opens a new string of text and the second orange quote closes it.
  • The first green quote escapes the second green quote leaving a single quote within the orange quote string. When evaluated, the resulting string between the orange quotes looks like this. (note, there is a space in front of AND)
 AND [Gender]="
  • An ampersand is used to concatenate the orange string of text with the value of [Gender]. The resulting concatenated string is shown below if, for example, the considered participant's gender was male.
 AND [Gender]="m
  • The first red quote opens a new string and the second red quote closes it.
  • The first blue quote escapes the second blue quote leaving a single quote within the red quote string.
  • When evaluated, the second green quote is paired with the second blue quote which encloses the value of [Gender]. The use of quotes around [Gender] is necessary because the value of [Gender] is a string and NOT a number.
  • Once all strings are concatenated and the function is evaluated, the resulting string of text within the DCount() function would be this.
[Contest]=1 AND [Gender]="m"

 

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.

 

 

 

Scoring Functions

2015 Age Graded Functions

For new events, it is recommended to use the 2020 Age Graded Functions. The 2015 functions will still be supported for legacy events.

2020 Age Graded Functions

Functions Reference

Type  

 

   
Arithmetic Operators + (addition) - (subtraction) * (multiplication) / (division)
  \ (integer division) % (remainder) ^ (exponentiation) : (time operator)
         
Comparison Operators < (less than) > (greater than) = (equal to) <> (not equal to)
  <= (less than or equal to) >= (greater than or equal to)    
         
Logical Operators OR  XOR (one or the other) AND  
         
Array Operators  IN NIN (not in)    

 

       
Control Functions if() switch() choose()  
         
String Functions left() right() mid() instr()
  instr2() val() len() lcase()
  ucase() trim() string() replace()
  reduceChars() removeAccents() chr() asc()
  ordinal() similarity() CorrectSpelling() stringCount()
  SplitString()      
         
Mathematical Functions int() sqrt() quersumme() abs()
  round() speed() pace()  
         
Result Functions TCount() TCountIf() TSum() TRSum()
  TMin() TRMin() TMinID() TMinName()
  TAvg() TRAvg() TMax() TRMax()
  TMaxID() TMaxName() TFirst() TRFirst()
  TFirstName() TFirstID() TLast() TRLast()
  TLastID() TLastName() T() TR()
  TName() TText() TPrev() DMaxMin()
  TMinIf() TMaxIf()    
         
Conversion Functions urlencode() NumberToWords() ZahlInWort() TimeFromString()
  md5() crc7()    
         
Time and Date Functions format() date() now() ElapsedTime()
  AgeOnDate()      
         
Check Functions inRange() isNumeric() isAlpha() hasChip()
  search() isUCICode() isUCIID() hasEntryFee(entryFeeID)
  isEligible() isValidEmail()    
         
Inter-Record Functions BunchTime() GapTimeTop() GapTimePrev() TeamGapTimeTop()
  TeamGapTimePrev() DCount() DSum() DMin()
  DAvg() DMax() DFirst() DLast()
  DConcat() DQuantile()    
         
Other Functions nz() min() max() first()
  last() table() Setting()     GetSex()    
  translate() rank(x) Text() ChangeLink()
         
Scoring Functions AgeGradedOC2015() AgeGradedLevel2015() AgeGradedFactor2015()  
  AgeGradedOC2020() AgeGradedLevel2020() AgeGradedFactor2020()