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"