Fields, Expressions and Functions

Fields contain data that can either be stored data or data calculated from other data like a rank.

Using Expressions and Functions you can combine fields, make calculations, modify values, and show the result on Lists or Certificates. For example, an Check Box Field has the value 1 if checked and 0 otherwise. Using an expression you can show yes/no or X/- instead.

Syntax

Definition of Syntax (programming languages): The syntax of a computer language is the set of rules that defines the combination of symbols that are considered to be a correctly structured document or fragment in that language.

Definition of Syntax: The arrangement of symbols and characters to form expressions or functions.

 

Symbols and their names

The following are symbols used to write Expressions and functions.

[

Open bracket
] Close bracket
( Open or left parenthesis
) Close or right parenthesis
" Quote, quotation mark, or inverted comma
| Pipe, or vertical bar
& Ampersand
{ Open brace, squiggly brackets, or curly bracket
} Close brace, squiggly brackets, or curly brackets
; Semicolon
: Colon
# Hash

 

When to use each symbol

When to use Brackets?

Brackets are used when referencing a Field within an Expression or a function.

Example: If we want to reference a participant's Contest we would do this

[Contest]

Example: If we want to compare a participant's Contest to see if it matches a specified contest id we need to do this

[Contest] = 1

If a participant is in contest 1 when we reference [Contest] with the use of brackets we will get the value of 1 back. This would evaluate the above example as true because 1 does equal to 1.

 

When to use Parentheses?

Parentheses are used to contain parameters within a Function.

Example: If we wanted to write an if statement to return yes if a participant is in contest 1 otherwise return no we could do this

​​​​​​if(​[Contest]=1;"yes";"no")

In the above example, we are using an if statement with parentheses to contain our expression.

Parentheses are also used to define the order of operations.

Example: You have a variable laps race with a parade lap, where the parade lap is 1 mile and a full lap is 10 miles. You want to calculate how many miles each participant completes, including the parade lap. You could use parentheses to define the order of operations for this calculation.

​​​​​(​([NumberOfLaps]-1)*10)+1

First, we want to calculate the number of full laps a participant completes. To do this, we subtract 1 lap (the parade lap) from the NumberOfLaps data field. Then we need to multiply that value by 10 miles. Lastly, we need to add 1 mile for the parade lap. If we were to fill in the above example with 5 laps the result would be 41 miles, which is 4 10-mile laps and 1 parade lap of 1-mile distance. This example assumes that the start/lap/finish timing point is the same for all laps, normal laps and the parade lap.

 

When to use Braces?

Braces are used when referencing the value of a Record Multiplier within a List.

Example: If we wanted to reference laps 1 through 3 and the laps are named Lap1, Lap2, Lap3 under Main Window->Special Results then we could do this

[Lap{n}]

In the above example, we are referencing laps 1 through 3 by appending the text Lap with the value of the record multiplier which is defined within two braces.

Braces are also used to translate strings into different languages.

Example: If we want the example above to display "Yes" or "No" when using the software or my.raceresult.com in English, or "Si" or "No" for Spanish, we would write:

​​​​​​if(​[Contest]=1;"{EN:yes|ES:si}";"no")

Note that the value for the different languages is separated by a pipe.

Braces are also used to call a Splits Selector in an output list.

Example: To call a selector you need to surround the selector with braces like this:

{Selector}.TimePositive

 

When to use Quotes?

Quotes are used to reference a text string.

Definition of String (computer science): A string is traditionally a sequence of characters, either as a literal constant or as some kind of variable.

Example: If we wanted to find all participants with the first name of John then we could set a filter like this

[Firstname] = "John"

In the above example, John is in quotation marks because his name is a String we are trying to compare to. Firstname is in brackets because it is a filed that will return a String value to compare with the String John.

 

When to use a Semicolon?

Semicolons are used to separate parameters within an Function.

Example: In an if statement there are three parameters. Each parameter needs to be separated with a semicolon like this

if([Bib]=1;"yes";"no")

In the above example, we are checking to see if Bib is equal to 1. If Bib is equal to 1 (true) then we return Yes otherwise (false) we return "No".

 

When to use an Ampersand?

Ampersands are used to append one string to another.

Example: If you want to add a string like "John" to a data field like [Lastname] then you can do something like this

"John " & [Lastname]

In the above example if the value of [Lastname] was "Doe" then the returned string would be "John Doe". This is also known as concatenating two strings together.

 

When to use a Hash?

A hash indicates that the expression is full-text. This way, you don't need to use quotes around text strings, and to use ampersands to combine fields, strings and functions. Fields and functions do need to be in square brackets.

Example: You can obtain the same result as above by writing the expression like this:

#John [Lastname]

 

 

 

Expressions

RACE RESULT offers two types of expressions. In Normal Expressions fixed texts will be in quotations marks, fields, functions and user defined fields/functions in square brackets and the text operator & connects several parts:

"My name is " & [FirstName] & " " & [LastName]

If you use this expression on a certificate, it will show for example: My name is John Doe.

Full-Text Expressions, on the other hand, are more suitable for longer texts such as the text of the confirmation email of the online registration. They start with a hash tag (#) and fields, functions and user defined fields/functions will be in square brackets:

#My name is [FirstName] [LastName]

In expressions, you can use FieldsFunctions, User Defined Functions, Operators and User Defined Fields.

Fields

Fields can be distinguished between Data Fields that are used to store information like Lastname or Club, and fields that have values calculated from other data like a rank.

All fields can either be shown on lists or certificates directly or be used in expressions. They can easily be selected in the Field Wizard.

Some fields use a Dot Logic, which means that for sets of data which all refer to the same context the same prefix is used and subsequent parameters can then be defined following a period.

For example Contest may have a variety of parameters relating to the Contest which can be appended such as Contest.Name or Contest.Length.

Participant Data Fields

The Participant Data Fields are specific to each individual participant record.

The following records can be entered or imported for each participant. 

Field Type
Bib int
Lastname

string (100)

Firstname

string (100)

Title

string (15)

YearOfBirth

int

DateOfBirth date
Gender

string (2)

Nation

string (50)

Contest int
Club

string (100)

License

string (25)

Status int
Comment

string (*)

Transponder1

string (40)

Transponder2

string (40)

RegNo

int

Street

string (100)

ZIP

string (10)

City

string (50)

State

string (3)

Country

string (50)

Email

string (100)

Phone

string (50)

CellPhone

string (255)

Language (See additional info below) string (2)

 

The following fields are automatically generated by the system during creation, see additional links for more information. 

Field Type
ID

int

AccountOwner

string (50)

AccountNo

string (12)

BranchNo

string (12)

Bank

string (50)

IBAN

string (36)

BIC

string (11)

SEPAMandate

string (35)

Voucher

string (20)

Created date
CreatedBy

string (25)

Modified date

GroupRegPos

int
GroupID int

Derived Fields

Derived Fields can be used like any other data field, but they are derived from other fields of the participant and cannot be changed.

Age*

Derived from date of birth and event date

AgeOnDec31

Participants age on December 31st in the event year

YearOfBirth2

two digit year of birth (e.g. 83), derived from date of birth

LastFirstName

Combines last and first name to (e.g.) Doe, John

FirstLastName

Combines first and last name to (e.g.) John Doe

AccountNoX Like AccountNo, but the last 3 characters are replaced by X
IBANX

Like IBAN, but the last 3 characters are replaced by X

StatusText Return the status name according to the Status field (DSQ, DNF, etc.)
Random Returns a random value between 0 and 1
TransponderInChipfile

If existing, this field returns the transponder code assigned by the Chip File

*Age is normally derived however it can be imported in place of DateOfBirth or YearOfBirth, in this case the DateOfBirth will be stored as the event date on the year which would correspond to the age. 

Event Data Fields

You also have access to the many attributes of the event and the selected contest / age group. A simple use case for that is a race certificate: instead of putting the event date on the certificate as fixed text, better use the field [Event.Date] so that you do not need to update the certificate next year.


Event

Referring to the Settings under Main Window - Basic Settings

Event Name of the Event
Event.Name Functions the same as [Event]
Event.ID Event ID
Event.Date Date From of the Event 
Event.Date1 Date From of the Event
Event.Date2 Date Until of the Event
Event.Type Type of Event.
Event.Country Event Location - Country
Event.ZIP Event Location - ZIP code
Event.Location Event Location - City
Event.Street Event Location - Street
Event.Currency Currency of the Event
Event.AttributeName The corresponding User-Defined Attribute for the Event

Contest

Contest ID of the participant's assigned Contest
Contest.Name Name of the Contest
Contest.Date Contest Start Date
Contest.Start Planned Contest Start Time
  .Text Format Start Time as Text
  .Decimal Format Start Time as a decimal value
Contest.FinishTimeLimit  

Finish Time Limit when assigned per Contest

  .Text Format Finish Time Limit as Text
  .Decimal Format Finish Time Limit as a decimal value
Contest.Length  

Length of the Contest as entered

  .Unit The assigned unit for Contest.Length
  .Meter The Contest Length as a value in meters
Contest.TimeFormat Time Format of the Contest
Contest.TimeRounding

A value corresponding to the Time Rounding to be applied to the Contest. 
1 to 5 = Round UP to nearest Second to Ten Thousandth

-1 to -5 = Round DOWN to nearest Second to Ten Thousandth
11 to 15 = Round to NEAREST Second to Ten Thousandth

Contest.Laps Number of Laps for the Contest
Contest.MinLapTime Minimum Lap Time of the Contest
Contest.AttributeName The corresponding User-Defined Attribute for the Contest
Contest.OrderPos Position of the contest in the Overview tab
Eligible

0 if the participant is eligible for the assigned Contest

1 if age is greater than max DOB

2 if age is less than min DOB

4 if gender is incorrect

5 if age is greater than max DOB and Gender is incorrect

6 if age is less than min DOB and gender is incorrect

 

AgeGroup

AgeGroup/AgeGroup1*, AgeGroup2, AgeGroup3

ID of the participants assigned Age Group, referring to sets 1, 2 and 3 respectively

AgeGroupX.ID

ID of the Age Group

AgeGroupX.Name

Name of the Age Group
AgeGroupX.NameShort Short Name of the Age Group
AgeGroupX.OrderPos The position of the Age Group according to the Ordering in the setup

*AgeGroup and AgeGroup1 function identically and can both be used for all derivatives. 

EntryFee

EntryFee

Entry fee amount calculated according to the Entry Fee Settings

BasicFee Same as EntryFee, but not considering optional entry fees.
 

Time Fields

The following fields refer to the Contest Finish Result:

Time  

Formatted time according to Time Format settings

  .Exists Returns a 1 if there is a time of any value in the result
  .Positive Returns 1 if a time greater than 0 is saved in the result.
  .Decimal Numerical value saved

 

.Rounded

Numerical value rounded according to Time Rounding settings

  .Text

Time as text formatted hh:mm:ss

Finished Returns 1 if a time > 0 is saved in the result, equivalent to [Time.Positive]

The following fields refer to the Contest Start Result:

Started Returns 1 if a time > 0 is saved in the result, if no start result is defined then this will be true if there is a time in the Result with the lowest ID.

The following refer to Start Times and Finish Time Limits. Fields for the Start Time work in the same way as general Result Fields.

Time0 Assigned Start time formatted according to the Time Format settings
Time0.Decimal
T0
Numerical Value of the assigned Start time
Time0.Rounded
TR0
Numerical Value of the assigned Start time rounded according to Time Rounding settings 
FinishTimeLimit Finish Time Limit as a numerical (decimal) value
FinishTimeLimitText Finish Time Limit formatted as a formatted time according to the Time Format settings

Lap times in Raw Data mode can be accessed without the need to set up individual lap calculations. Replace TimingPointName and X. Lap times considers contest Minimum Lap Time. 

TimingPointName.LapX Lap time of lap X in seconds.
TimingPointName.ReadX Race time after the read X in seconds
TimingPointName.LapXText Formatted lap time X which considers contest rounding settings
TimingPointName.ReadXText Formatted race time X which considers contest rounding settings

Split Fields

Each split and sector calculates a range of fields for each meaning the setup required in RACE RESULT 12 is less than when using results but provides more information. Splits and their derived fields are called using a string which always starts with the split or sector name.

Splits use the Dot Logic format for fields, and all Split fields start with the Split Name or Leg Name. 

e.g. [SplitName.FieldName]

Sometimes it may be useful to access the data from either the previous or next split, to do this append .prev or .next to the Split name and then any other Split fields can be called in the same way. 

e.g. [SplitName.Prev.Fieldname] or [SplitName.Next.FieldName]

On live leaderboards or monitoring it is often useful to access the data from the Last Split a participant has reached, to do this replace SplitName with {LastSplit}, this will then return the subsequent fields for the last split according to the order of Splits in the setup at which the participant has a time.

e.g. [{LastSplit}.FieldName]

Result Fields

Results hold numerical values which are mostly times in number of seconds, but they can also represent points, number of laps or other values.

Result fields use the Dot Logic using either TimeX or NameOfResult, replace X with the ID of the Result, e.g. Time5.Decimal for the value in the result with ID 5.

For each result the following fields are available

TimeX
NameOfResult
 

Formatted time according to Time Format settings

  .Decimal Numerical value saved

 

.Rounded

Numerical value rounded according to Time Rounding settings

  .Text Time as Text formatted hh:mm:ss
  .Positive Returns 1 if a time > 0 is saved in the result.
  .Info Text saved along with the time, usually details from the timing system.
  .Overwritten Returns 1 if the result is overwritten

The following short versions can also be used, these do not apply Dot Logic.

Tx Numerical value saved (Equivalent to TimeX.Decimal)

TRx

Numerical value rounded according to Time Rounding settings (Equivalent to TimeX.Rounded)

Rank Fields

After defining the ranking with ID X, the following additional fields can be used.

Rank fields use the Dot Logic to return a variety of fields, in all Dot Logic fields either RankX or the RankName can be used.

RankX
NameOfRank

The rank of the participant according to the ranking definition, e.g. 47
The name of the ranking can be used as well, for example GenderRank

RankX.p
NameOfRank.p

The rank with a period at the end, e.g. 47.

RankX.th
NameOfRank.th
The rank as an ordinal value, e.g. 47th

RankX.Max
NameOfRank.Max

The number of participants in the same group who have been ranked, e.g. 495.
MaxRank helps to create an output like: 47 of 495 

RankX.Top.Y
NameOfRank.
Top.Y
The data in field Y of the first athlete according to the specified rank.
Field Y can be any field name
RankX.Last.Y
NameOfRank.
Last.Y
The data in field Y of the last athlete according to the specified rank.
Field Y can be any field name
RankX.Prev.Y
NameOfRank.Prev.Y

The data in field Y of the previous athlete according to rank X.
Field Y can be any field name

RankX.Next.Y
NameOfRank.Next.Y

The data in field Y of the next athlete according to rank X.
Field Y can be any field name

Team Score Fields

After defining the Team Score with ID X, the following additional fields can be used (note that you can always replace TSx with the Team Score name, e.g. Team Results M/F.Rank):

Team Score ranks also use the field Dot Logic for additional formatting of ranks.

TSx.Rank
TeamScoreName.Rank

 

Rank of the team, e.g. 13

 

.P

Rank of the team with a period at the end, e.g. 13.

  .Th The rank as an ordinal value, e.g. 13th
  .Max Maximum rank given to a team in the group, or in other terms, the number of teams ranked in the same group as the considered participant.

TSx.DecimalTime1
TSx.DecimalTime2
TSx.DecimalTime3
TSx.DecimalTime4

Decimal times of the team

TSx.Time1
TSx.Time2
TSx.Time3
TSx.Time4

Formatted times of the team

TSx.Scored

1 if the participant was scored, 0 otherwise.
When using the option Max. No. Of Teams: 1 and show all participants, then not all team members will be scored.

TSx.Gender

Gender of the scored team members.
1=only men, 2=only women, 3=men and women

TSx.GenderAll

Gender of the team including all team members.
1=only men, 2=only women, 3=men and women

TSx.Position

Position of the athlete within the team, based on the results or order setting of the Team Score.

TSx.TeamIndex

Number of the team, if there are several teams for the same club.

TSx.Number

Number of members in the team.

TSx.NumberWomen

Number of women in the team.

TSx.NumberScored

Number of scored members in the team.

TSx.NumberWomenScored

Number of scored women in the team.

TSx.DecimalTimeTop1
TSx.DecimalTimeTop2
TSx.DecimalTimeTop3
TSx.DecimalTimeTop4

Decimal times of the first team in the ranking.

TSx.DecimalTimePrev1
TSx.DecimalTimePrev2
TSx.DecimalTimePrev3
TSx.DecimalTimePrev4

Decimal times of the previous team in the ranking.

TSx.TimeTextTop1
TSx.TimeTextTop2
TSx.TimeTextTop3
TSx.TimeTextTop4

Formatted times of the first team in the ranking.

TSx.TimeTextPrev1
TSx.TimeTextPrev2
TSx.TimeTextPrev3
TSx.TimeTextPrev4

Formatted times of the previous team in the ranking.

Payment & Finance Fields

Fields with the prefix OP refer to the actual Online Payment. If you perform any entry fee changes after a regular registration, it will change [EntryFee] but not [OPEntryFee]. Online Payment Fields always relate to the settings at the time of registration.

Field Explanation

OPID

ID of the payment process
OPBalance Balance of the online payment (<0: not paid completely, >0: paid too much)
OPBalanceDate Date of the balance entry
OPCurrency Currency used for the chosen payment method
OPMethod

Payment Method. 1=ELVD, 2=CCEUR, 3=CCCHF, 4=UEBD, 5=BAR, 6=SPF, 7=PPAL, 8=UEBCH, 9=VOUC, 10=EINZCH, 11=UEBAT, 12=SOFUEB, 13=ELVAT, 14=PPalGBP, 15=PPalUSD, 16=SEPA, 17=CCGBP, 19=SEPADATA, 20=OWNEPay, 21=OwnPPal, 22=OwnWireT, 24=OwnPaysBuy, 25=OwnPaytrail, 26=OwnOnePay , 27=TelrAccount, 28=OwnOnePay Domestic, 31=Stripe

OPEntryFee Total Entry fee charged through online registration
OPToPay

Amount to pay (currency of the payment method)

OPPaymentFee Total payment fees (currency of the payment method)
OPUserFee

Payment fees covered by the participant.

OPReference

Payment reference.

PaymentLink Link to pay remaining entry fee amount (no longer available since v12.5)
EntryFee Calculated entry fee
BasicFee Calculated entry fee without optional fees.
EntryFeePaid 1 if entry fee has been paid, 0 otherwise
PaidEntryFee Amount of entry fee paid during registration only.
AccountOwner Participant's bank account details.
AccountNo Participant's bank account details.
AccountNoX Account number with the last three digits replaced by X
BranchNo Participant's bank account details.
IBAN Participant's bank account details.
IBANX IBAN with the last three digits replaced by X
BIC Participant's bank account details.
SEPAMandate Participant's bank account details.
Bank Participant's bank account details.

 

Vouchers

Voucher fields use the Dot Logic for subsequent fields

Field Description
Voucher Voucher code used
Voucher.Amount Amount of Voucher
Voucher.Remark Voucher Remark

List Numbering

Rankings are a handy concept since they are defined once and can then be used everywhere - on a list, in a certificate, in a text message. However, sometimes you may want to create a numbered list quickly without creating a rank definition.

Let's assume you need a result list of all participants named John. Simply add a filter to the list and use the field Position instead of the rank:



Looks good, but it should start at 1 again for the 5K race. For that, you can use the field Position1 which will start over at 1 when the highest grouping level changes the value. Position2 would start over at 1 when the first or second highest grouping level changes the value.



Other

Other Data Fields

Random Random number between 0 and 1

Fields List Reference

Type        
Participant Data Fields Bib Lastname Firstname Title
  YearOfBirth DateOfBirth Gender Nation
  Contest Club License Status
  Comment Transponder1 Transponder2 RegNo
  Street ZIP City State
  Country Email Phone CellPhone
  Created Modified CreatedBy Language
  GroupID GroupRegPos ChangeLink  
         
Derived Fields Age* AgeOnDec31 YearOfBirth2 StatusText
  LastFirstName FirstLastName TransponderInChipFile Random
         
Country and Nation Country.Name Nation.Name Country.Name.lang Nation.Name.lang
  Country.IntName Nation.IntName Country.Alpha2 Nation.Alpha2
  Country.Alpha3 Nation.Alpha3 Country.IOC Nation.IOC
  Country.UCI Nation.UCI Country.Flag Nation.Flag
  Country.Currency Nation.Currency Country.isEU Nation.isEU
         
Event Data Fields Event Event.Name Event.ID Event.Date
  Event.Date1 Event.Date2 Event.Type Event.Country
  Event.ZIP Event.Location Event.Street Event.Currency
  Event.AttributeName      
         
Contest Contest Contest.Name Contest.Date Contest.Start
  Contest.Start Contest.Start.Text Contest.Start.Decimal Contest.TimeFormat
  Contest.FinishTimeLimit Contest.FinishTimeLimit.Text Contest.FinishTimeLimit.Decimal Contest.TimeRounding
  Contest.Length Contest.Length.Unit Contest.Length.Meter Contest.OrderPos
  Contest.Laps Contest.MinLapTime Eligible  
         
Age Groups AgeGroup.Name AgeGroup.NameShort AgeGroup.ID AgeGroup.OrderPos
  AgeGroup2.Name AgeGroup2.NameShort AgeGroup2.ID AgeGroup2.OrderPos
  AgeGroup3.Name AgeGroup3.NameShort AgeGroup3.ID AgeGroup3.OrderPos
         
Result Fields TimeX.Exists TimeX.Positive TimeX.Decimal TimeX.Rounded
  TimeX.Text TimeX.Info TimeX.Overwritten  
  TX TRX    
         
Time Fields Started Finished    
  Time Time.Exists Time.Positive Time.Decimal
  Time.Rounded Time.Text FinishTimeLimit FinishTimeLimitText
  Time0 Time0.Decimal Time0.Rounded  
         
Timing Points TimingPoint.LapX TimingPoint.ReadX TimingPoint.LapXText TimingPoint.ReadXText
         
Split fields SplitName SplitName.TOD  SplitName.Gun SplitName.Chip
  SplitName.Sector LegName SplitName.Prev.FieldName SplitName.Next.FieldName
  .Predicted .Text .Decimal .Rounded
  .Name .Label .OrderPos  
         
Split Ranks .Overall .Gender .AgeGroup  
  .P .Th .Max  
         
Split Gaps .GapTop .GapPrev    
  .Top .Last .Prev .Next
         
Split/Leg Calculations .Exists .Positive .SplitCount .Distance(.Meter/.Km/.Miles)
  .SpeedOrPace .Speed(.Decimal) .Pace(.Decimal)  
         
         
Rank Fields RankX RankX.p RankX.th RankX.Max
  RankX.Top.FieldName RankX.Last.FieldName RankX.Prev.FieldName RankX.Next.FieldName
         
         
TeamScore Fields TSx.Rank TSx.Rank.P TSx.Rank.th TSx.Rank.Max
  TSx.DecimalTime1..4 TSx.Time1..4 TSx.Position TSx.TeamIndex
  TSx.Scored TSx.NumberScored TSx.NumberWomenScored TSx.NumberWomen
  TSx.Number TSx.Gender TSx.GenderAll  
  TSx.DecimalTimeTop1..4 TSx.DecimalTimePrev1..4 TSx.TimeTextTop1..4 TSx.TimeTextPrev1..4
  TSX.PY.[FieldName]      
         
         
Team Lap Race Fields TSX.LTNumber TSX.LTMin TSX.LTAvg TSX.LTMax
  TSX.LapTimeMin TSX.LapTimeAvg TSX.LapTimeMax TSX.LTMinLap
  TSX.LTMaxLap TSX.LTSum TSX.LTLastLap TSX.LTEtaps
  TSX.LTLemans TSX.LTActive    
         
  TSX.LTTeamNumber TSX.LTTeamNumberWomen TSX.LapTimeTeamAbs(n) TSX.LapTimeTeam(n)
  TSX.LTTeamMin TSX.LTTeamAvg TSX.LTTeamMax TSX.LapTimeTeamMin
  TSX.LapTimeTeamAvg TSX.LapTimeTeamMax TSX.LTTeamMinLap TSX.LTTeamMaxLap
  TSX.LTTeamLastLap TSX.LTTeamSum TSX.LTTeamTotal TSX.LTTeamEtaps
  TSX.LTTeamLemans TSX.LTTeamLemansBib TSX.LTTeamPenaltyTime TSX.LTTeamPenaltyLaps
         
         
Payment & Finance Fields OPID OPBalance OPBalanceDate OPCurrency
  OPMethod OPEntryFee OPToPay OPPaymentFee
  OPUserFee OPReference PaymentLink EntryFee
  BasicFee EntryFeePaid PaidEntryFee AccountOwner
  AccountNo AccountNoX BranchNo IBAN
  IBANX BIC SEPAMandate Bank
         
  Voucher Voucher.Amount Voucher.Remark  

* Age is calculated based on the Event date. 

Operators

The following Operators can be used in expressions:

Arithmetic Operators

Using the following arithmetic operators you can make any type of calculation:

+ addition
- subtraction
* multiplication
/ division
\ integer division
% the remainder after division of integers
^ exponentiation
( opening parenthesis
) closing parenthesis
: time operator, multiplies the left operand with 60 and adds the right operand

If you would like to add the race number and the year of birth and multiply the result with two, use the following expression:

([Bib] + [Year]) * 2

Comparison Operators

Use the following comparsion operators to compare two values:

< less than
> greather than
= equal
<> not equal
<= less than or equal to
>= greater than or equal to

Logical Operators

Using logical operators, you can combine two conditions, for example in a Filter. The following operators are available:

  • OR (At least one of the values is true)
  • XOR (Must be one OR the other, cannot be both)
  • AND

Array Operators

  • IN
  • NIN (NOT IN)

If the Data field is IN or is NOT IN the text string, multiple values can be separated by commas.

Examples:

[Contest] IN "2,4,8-10"
[Lastname] NIN "Smith,Doe"

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

String Functions

Mathematical Functions

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. 

Conversion Functions

Time and Date Functions

Check Functions

Inter-Record Functions

Other Functions

Scoring 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()  

 

User Defined Fields

Using User Defined Fields you can can assign a specific name to any Expression. The expression can then be accessed throughout the event file. They are defined in Main Window->Participants Data->User Defined Fields/Fcts.

For example, by default, the User Defined Field DisplayName is defined using this expression:

trim([Title] & "" & [Firstname] & "" & [Lastname])

DisplayName is being used on almost all lists to show that expression. If you do decide to use a different expression such as

UCase([Lastname]) & "" & [Firstname]

then you only have to change the User Defined Field once instead of modifying every single list.

User Defined Functions

Similar to User Defined Fields you can also define your own User Defined Functions. They will also be defined in the Main Window->Participants Data->User Defined Fields/Fcts.

Assume you would like to change the upper/lower case of words, so that the first letter is in upper case and the other letters in lower case. For this you could define a function RightCase:

RightCase(x)
lcase(left([x];1)) & lcase(mid([x]; 2))

You can use the new function like any other function now. For example this will return Raceresult:

RightCase("raCEreSuLt")

Functions can also have several parameters. As an example, define a function add:

add(x;y)
[x]+[y]

The names of the parameters can be defined freely. When using them in the definition of the function, they have to be in square brackets.

Filter

In many parts of RACE RESULT 12 you will find a textbox to enter a filter. A filter is an expression that returns true or false. It is based on the comparision, array, and logical operators.

Field names will be in square brackets and values (apart from numbers) in double quotation marks. For example:

[LastName]="Miller"

If you would like to connect several filters, you can use the logical operators AND and OR:

[LastName]="Miller" AND [City]="New York"

Field Wizard

The Field Wizard pops up at many places in RACE RESULT 12 below setting fields, for example. in the settings of a lists or when defining ranks. The Field Wizard makes it easy to select the fields shown on a list for example. The field wizard will automatically appear when entering a new field, if editing an existing field then you can choose to show the wizard by clicking the gear icon on the right of the entry field.