Adding Additional Training Time Periods

If you have defined your own training time periods using the FREQUENCY Lookup you must copy and amend the predefined TEMPLATE_BIS_TRAINING_CONVERT_DURATION formula. If you do not add your additional time periods to the formula the hours for these events will not be included in the report and workbooks.

For example, if you set up a time period called Fortnight using the Lookup code of F (Fortnight), use the Formula window to amend the formula as follows:

  1. Copy the predefined template formula TEMPLATE_BIS_TRAINING_CONVERT_DURATION.

    You must name the new formula BIS_ TRAINING_CONVERT_DURATION, otherwise the report and workbooks cannot use it.

  2. Add the additional text shown in bold to set up the formula so that it converts fortnight into hours:

    /* Main Body of Formula */
    	hours_per_day = 8
    	hours_per_week = hours_per_day * 5
    	hours_per_fortnight = hours_per_week * 2
    hours_per_month = hours_per_week * 4.225
    	hours_per_year = hours_per_month * 12
    	
    /* Calculate Duration in Hours */
    	IF (from_duration_units = 'Y') THEN
    	 hours = from_duration * hours_per_year
    	ELSE IF (from_duration_units = 'M') THEN
    	 hours = from_duration * hours_per_month
    	ELSE IF (from_duration_units = 'F') THEN
    	 hours = from_duration * hours_per_fortnight
    ELSE IF (from_duration_units = 'W') THEN
    	 hours = from_duration * hours_per_week
    	ELSE IF (from_duration_units = 'D') THEN
    	 hours = from_duration * hours_per_day
    	ELSE IF (from_duration_units = 'H') THEN
    	 hours = from_duration
    	ELSE
    	 hours = 0
    /* Calculate Duration in desired units */
    	IF (to_duration_units = 'H') THEN
    	 to_duration = hours
    	ELSE IF (to_duration_units = 'D') THEN
    	 to_duration = hours / hours_per_day
    	ELSE IF (to_duration_units = 'W') THEN
    	 to_duration = hours / hours_per_week
    	ELSE IF (to_duration_units = 'F') THEN
    	 to_duration = hours / hours_per_fortnight
    ELSE IF (to_duration_units = 'M') THEN
    	 to_duration = hours / hours_per_month
    	ELSE IF (to_duration_units = 'Y') THEN
    	 to_duration = hours / hours_per_year
    	ELSE
    	 to_duration = 0
    RETURN to_duration
    
  3. Compile the formula.

For more information on editing a formula, see: Writing or Editing a Formula