ORA_WFM_TCR_THRESHOLD_WITH_EVENT_CHANGES_MSR_AP Fast Formula

This sample fast formula determines whether daily reported time should be updated to include an overtime entry. If it does, the formula updates the existing reported time to the value stored on the assignment record.

In this formula’s case, the assignment value is a descriptive flexfield named OT Hours Threshold. OT Hours Threshold maps to Assignment Attribute2, which gets the initial value from the PER_ASG_ATTRIBUTE2 database item and the event from ASS_ATTRIBUTE2. The formula also adds an overtime entry with the remaining reported time. If the stored value changes in the middle of the time card period, the formula uses the new stored value to calculate overtime for the subsequent days. To check whether the stored overtime value changed, the event database items use the person ID for the time card individual, the time card period, and the assignment OT Hours Threshold field. This formula uses an array to process time data.

Parameters

Name Type Description
WORKED_TIME_CONDITION Time category Time category that identifies the time entries to use to determine the hours under and over the thresholds
DEFAULT_HOURS_BEFORE_OVERTIME Fixed number Default hours limit, which is used if the initial assignment and event threshold values are Null.

Outputs

Name Output Group Time Attribute Description
OUT_GRP1_MEASURE_UNDER 1 Measure Calculated hours under the daily threshold
OUT_GRP1_START_TIME_UNDER 1 StartTime Start time under the daily threshold
OUT_GRP1_STOP_TIME_UNDER 1 StopTime Stop time under the daily threshold
OUT_GRP2_MEASURE_OVER 2 Measure Calculated hours over the daily threshold
OUT_GRP2_START_TIME_OVER 2 StartTime Start time over the daily threshold
OUT_GRP2_STOP_TIME_OVER 2 StopTime Stop time over the daily threshold

Function

This formula calculates daily overtime using rule inputs stored on the assignment record. The inputs can change over the time card period, so you use this formula to get the correct value for each day. This way the daily overtime calculation results are always accurate.

This formula sums the daily time entries identified by the WORKED_TIME_CONDITION and uses the specified overtime threshold to calculate daily overtime.

  • If the assignment OT Hours Threshold descriptive flexfield is Null, the formula uses the DEFAULT_HOURS_BEFORE_OVERTIME value.
  • If the flexfield value isn't Null, the formula uses the PER_ASG_ATTRIBUTE2 database item value of PER_ASG_ASSIGNMENT_DETAILS Route (PER_ALL_ASSIGNMENTS_M table), for the overtime threshold.

    To get any changes to the OT Hours Threshold field from the events table, the formula uses the ORA_HWM_PROCESS_EVENTS_CHG_RN route database items.

Example

Scenario: You store people's overtime thresholds on the OT Hours Threshold descriptive flexfield. The initial threshold value for Chris, who works 40 hours a week is 8, but changes on Wednesday to 10.

Example: You create a rule with your template where the default daily threshold is 8 hours. The time category is All Payroll Time Types and the payroll time type for calculated hours over the threshold is Overtime.

Day Payroll Time Type Reported Time Calculated time
Mon Regular 10h 8h
Overtime 0h 2h
Tue Regular 10h 8h
Overtime 0h 2h
Wed Regular 10h 8h

2h

Thu Regular 12h 10h
Overtime 0h 2h