Custom fields

Custom fields

With some programming and JavaScript knowledge, you can create your own custom fields and values. You have full access to all values of the training as well as to your zone and body data.

Custom fields are marked with a * in lists and are shown on the training page, also aggregated and represented in the annual overview and in the diagrams of the evaluation.

This custom field calculates the number of heartbeats during a workout
This custom field calculates the number of heartbeats during a workout

Ruleset

The training object is bound to "this"

The training object with all its predefined metrics is bound to the keyword "this".

You can output this object with "console.log(this);" to the developer console of your web browser to see which metrics a training has.
Then go to the calendar view, evaluation or training details view to run the custom field.
The developer console can be opened on Windows with Ctrl+Shift+I.

The field must return a number

The "return" keyword must be given a number. Otherwise the field "NaN" is calculated by the field and is not displayed.
Other strings cannot be returned for security reasons.

Aggregation

The aggregation of the field determines which method is used to aggregate the field in the evaluation, i.e. in Aggregation chart or Relation chart.

Total

The calculation of the result of each training is added together in the evaluation.
An example is the "distance" or "duration" of an activity. These metrics are summed.

Average by number

The result of the trainings is totaled in the evaluation and then divided by the number of trainings.
An example is the "temperature", which is displayed as an average of the number of training sessions in the evaluation.

Average by duration

The result of the training is summed up in the evaluation and then divided by the total duration of the training.
An example is the "heart rate", which is displayed as an average of the training duration in the evaluation.

Metrics and values of a workout

Please note that the list may be incomplete as new metrics are added from time to time and the list may not have been updated.
It is always a good idea to temporarily activate the debug field to see what metrics a training really has.

The underlying value system is metric and must be converted if necessary.

The following metrics can be bound to the training object "this".

List of possible values of a workout
NameDescriptionType
heartrateAverage heart rateNumber
aerobicTrainingEffectAerobic training effect - proprietaryNumber
altitudeelevation data - ascent, descent, vertical meters (Meter)Object
{
  "ascent": 124,
  "descent": 242,
  "elevation": 82
}
anaerobicTrainingEffectAnaerobic training effectNumber
apparentTemperatureFeels like temperature (Celcius)Number
bikesEquipment - BicyclesObject
bodyElasticityBody elasticityNumber
cadenceAverage cadenceNumber
cadenceMaxMaximum cadenceNumber
caloriesKilocaloriesNumber
cloudCoverCloudsNumber
confirmedConfirmed planned trainingBoolean
dateDate of trainingDate
deviceNameName of the recording deviceString
devicesDevices (Strap, Stryd, etc..)Object
distanceDistance (Meter)Number
distanceBySpeedDistance by speed (Meter)Number
durationActive duration (Seconds)Number
durationPausedPause time (Seconds)Number
durationTotalTotal duration (Seconds)Number
efficencySwimming efficiencyNumber
efficencyMinMinimal swimming efficiencyNumber
effortEffort - determined by zone priorityNumber
enjoymentEnjoymentNumber
fatBodyfatNumber
formPowerForm PowerNumber
formPowerFactor"Form Power" IndexNumber
ftpFunctional Threshold PowerNumber
ftpaFunctional power threshold speedNumber
groundContactTimeGround contact time (Milliseconds)Number
groundContactTimeBalanceGround contact time balance (Percentage of left)Number
groundContactTimeMinMinimum ground contact time (Milliseconds)Number
groundContactTimeOEMGround contact time of the original device (Milliseconds)Number
heartrateAverage heart rateNumber
heartrateMaxMaximum heart rateNumber
heartratePerceivedPerceived Heart RateNumber
heartratePerceivedPercentagePerceived heart rate %maxHFNumber
heartratePercentageHeart rate %maxHFNumber
heightHeight (Centimeter)Number
hrLthLactate threshold heart rate of capacityNumber
hrMaxMaximum heart rate of capacityNumber
hrRestResting heart rateNumber
hrvValueRecovery value - proprietaryNumber
humidityHumidityNumber
idUnique identification numberString
intensityDistributionIntensity distribution (Seconds)Object
{
  "heartrate": null,
  "power": {
    "0": 1852,
    "1": 0,
    "2": 0
  },
  "pace": {
    "0": 1858,
    "1": 0,
    "2": 0
  },
  "cadence": {
    "0": 402,
    "1": 1264,
    "2": 192
  }
}
isRaceCompetitionBoolean
kiloJouleKilojoulesNumber
leftPedalSmoothnessPedal smoothnessNumber
rightPedalSmoothnessPedal smoothnessNumber
leftRightBalancePedal balanceNumber
leftTorqueEffectivenessTorque efficiencyNumber
rightTorqueEffectivenessTorque efficiencyNumber
legSpringStiffnessLeg Spring StiffnessNumber
legSpringStiffnessMaxMaximum Leg Spring StiffnessNumber
miscEquipmentGeneric EquipmentObject
muscleMuscle percentageNumber
ozoneAtmospheric ozoneNumber
paceAverage Pace (Seconds per kilometer)Number
paceBySpeedAverage Pace by speed (Seconds per kilometer)Number
paceGradeAdjustedGrade adjusted average pace (Seconds per kilometer)Number
paceGradeAdjustedPerceivedPerceived grade adjusted average pace (Seconds per kilometer)Number
paceMaxMaximum Pace (Seconds per kilometer)Number
pacePercentagePace from FTPa in %Number
perceivedEffortPerceived effortNumber
performanceConditionPerformance condition - proprietaryObject
poolLengthPool lengthNumber
positionLatLatitudeNumber
positionLongLongitudeNumber
powerAverage powerNumber
powerAerobicFactorHeart Rate Power FactorNumber
powerMaxMaximum powerNumber
powerPerceivedPerceived PowerNumber
powerPerceivedPercentagePerceived power in % of FTPNumber
powerPercentagePower in % of FTPNumber
precipIntensityPrecipitation intensityNumber
precipProbabilityProbability of precipitationNumber
pressurePressureNumber
recoveryTimeRecovery time - proprietaryNumber
shareIdIdentification number of the public trainingString
shoesEquipment ShoesObject
sicknessIntensityDisease - IntensityNumber
speedSpeed (Meters per second)Number
speedAerobicFactorHeart Rate Pace FactorNumber
speedIndexPace Power IndexNumber
speedMaxMaximum speed (Meters per second)Number
sportTypeSportString
"running" "cycling" "swimming" "misc"
subSportTypeSubsportString
"hiking" "skiing" "treadmill" ...
stepLengthStep lengthNumber
stepLengthMaxMaximum stride lengthNumber
stepsStepsNumber
strokeLengthStroke lengthNumber
strokeLengthMaxMaximum stroke lengthNumber
strokesSwim strokesNumber
temperatureDevice temperatureNumber
temperatureStationTemperatureNumber
timezoneTimezoneNumber
titleTitleString
trainingTypeType of trainingString
"planned" "file"
uvIndexUV indexNumber
verticalOscillationVertical oscillationNumber
verticalOscillationOEMVertical oscillation (original device)Number
visibilityVisibilityNumber
vo2maxVO2maxNumber
vo2maxRelativeRelative VO2maxNumber
walkingDurationDuration walkingNumber
waterBody water percentage in %Number
weightBody weightNumber
windBearingWind directionNumber
windGustGustNumber
windSpeedWind speedNumber
zonesZone distributionObject
{
  "cadence": [
    {
      "name": "Leicht",
      "from": -1,
      "to": 167,
      "intensity": 0,
    },
    {
      "name": "Moderat",
      "from": 168,
      "to": 176,
      "intensity": 1,
    },
    {
      "name": "Intensiv",
      "from": 177,
      "to": -1,
      "intensity": 2,
    }
  ],
  "heartrate": [
    {
      "name": "Sehr leicht",
      "from": -1,
      "to": 125,
      "intensity": 0,
    },
    {
      "name": "Leicht",
      "from": 126,
      "to": 149,
      "intensity": 0,
    },
    ...
  ],
  "pace": [
    {
      "name": "Sehr leicht",
      "to": 410,
      "from": -1,
      "intensity": 0,
    },
    {
      "name": "Leicht",
      "to": 371,
      "from": 409,
      "intensity": 0,
    },
    ...
  ],
  "power": [
    {
      "name": "Sehr leicht",
      "from": -1,
      "to": 170,
      "intensity": 0,
    },
    {
      "name": "Leicht ",
      "from": 171,
      "to": 190,
      "intensity": 0,
    },
    ...
  ]
}
.........

Series of a training

This function is only available in the training details view.

In the object "seriesSampled" the time series of a training are stored.

Get an exact overview of the possible values with the activated debug field.

The time series are stored in reduced form and must be extrapolated with "sampleSize".

this = {
  ...,
  seriesSampled: {
    sampleSize: 2,
    endOffset: 0,
    data: {
      heartrate: [ 123, 122, 122, 130, 132, ... ],
      power: [ 223, 222, 252, 270, 270, ... ],
      ...
    }
  },
  ...
}