Computed Fields are additional fields computed by RaceDay Scoring that are added to your existing data set to be used in Reports. They allow you to have additional data beyond just your Participant Information and any Chip Read Times for a Participant.

There are two types of Computed Fields - Automatic and Custom.

Automatic Computed Fields are generated for you based on your Race configuration. Examples of Automatic Fields are as follows:

  • Chip Times
  • Gun Times
  • Segment Times
  • Paces
  • Cumulative Segment Times and Paces

Custom Computed Fields are user-defined fields that can be created by you if you want to write a custom Function to calculate some data to use for Reports. Custom Computed Fields can do formulas and comparisons between other Computed Fields (automatic or custom) in order to produce new fields that you can add to reports, or sort your reports on.

Some examples of Custom Fields you could build are as follows:

Getting Started with Custom Computed Fields

Custom Computed Fields can be created by going to the Scoring tab, then opening up the Computed Fields panel and selecting Add/Edit Custom Fields:

Then select "Add a Field"

Setting up a Custom Computed Field

The first step to setting up a Custom Computed field is to provide the Computed Field Name and the Field Label.

The Computed Field Name is used internally to identify the field, and the Field Label is what is displayed in the actual software. 

For Custom Computed Fields, these two can be the same thing.

A Note on Time Fields

RaceDay Scoring stores all of its time calculations in milliseconds, and has a secondary field that converts any times that are used for display to a more humanly readable standard time format. If you try to use a calculation or sort function on a non-ms version field, it will not work as expected. 

Therefore, if you intend to use a custom computed field for further calculations or sorting functions and for display purposes, you will need to make sure that you create a version in millisecond format for calculations and sorts and non-ms version for display purposes. This is accomplished by using the "ms2time" transformation function which will be discussed later.

Type of Value

Next you will need to decide the Type of Value that this field is. There are two options: Existing Field and Operation.

The Existing Field type of value allows you to reference an existing field (like a participant name or other calculated field like a finish time), and use it in an Operation or use a Transformation to change how the value is displayed.

Transformations of Existing Fields allow you to return a transformed version of that field. The most common usage of Transformations is to create a standard time format version of an Existing Field that is currently in millisecond format. 

To use a Transformation you must select Existing Field for the Type of Value, then pick a Field to base it on. Next, type in the Transformation tag  to decide which Transformation you would like to use.

The available Transformations are:

  • abs — Absolute value (Negative values will return as if they were positive. Can be useful for prediction runs)
  • ms2time — Convert time in milliseconds to a readable time in the hh:mm:ss.sss format.
  • upper — Make a value all uppercase.
  • lower — Make a value all lowercase.
  • substr(<index>,<length>) — Substring of given length string at given index (0 based).

For instance, if you created a "Fastest Transition (ms)" Custom Computed Field, and wanted to display that in reports, you would want to convert it to be useful to display in a Report, you would do something like this:

Operations allow you to create a formula to take some other fields as an input and produce a new field. There are many different types of Operations available for you to use.

  • Misc Type
    • Fixed Value - This allows you to set the field to be some set value. This is useful if you want to display some set text in a field, or if you need to do a calculation with a set number in an Operation.
    • For example, this would simply display "5" if you added it to a Report:
  • Logic
    • Conditional (IF/ELSE) - This allows you to set a Condition that controls what the field will display. For instance, you could create a field that shows "Local" if their Zip Code is equal to "53593" by setting up a field like this: 
      • Available Conditions
        • Not Equal
        • Equal
        • Less Than
        • Less Than or Equal
        • Greater Than
        • Greater Than or Equal
  • Math - These can be used to do math between provided fields. You can use Fixed Value Operations or Existing Fields to base your calculations on. For instance, you could multiply a Segment Time by 5 like this: 
    •   Addition
    •   Subtraction
    •   Multiplication
    •   Division
    •   Mod
  • Aggregate - These fields can be used to consider multiple fields and return a value based on them in some way. 
    •  Average - This will return the average of the two provided fields
    •   Minimum - This will return the minimum of the two provided fields
    •   Maximum - This will return the maximum of the two provided fields.

For instance, you could create a field that returns the fastest of two transition times like this:

Automatic Display Fields

When you create a custom computed field that is based on millisecond fields, we will automatically create a secondary display field that applies the ms2time transformation. We also updated how the field labels work, so the original field that is in milliseconds has " (ms)" added to the end of the field name, while the time formatted field will just be the field name you enter. 

So if I do something like this:

I get two fields, one called "Custom Time (ms)" that is in milliseconds, and "Custom Time" which is that field with ms2time applied. The ms field can be used for sorting or in other calculated fields, while the display version can be shown in reports.