Example: Calculate Location-Based Overtime
In this example, nonresidents working in XYZ State, USA are eligible for XYZ State
double time. Workers in XYZ State are paid double time after 12 hours of work in a day,
whether they're residents of the state or not. This example shows you how to combine
calculated fields and time calculations to accommodate this requirement.
- Access theCreate Calculated Fieldtask to create calculated fields that build on each other. You'll use the final calculated field in this step in the time block conditional calculation.
- Create a calculated field that returns a worker's default state.FieldValueField NameWorker's Default State for a Time BlockBusiness ObjectTime BlockFunctionLookup Related ValueLookup FieldWorkerReturn ValuePrimary Address - State/Province
- Create a calculated field that returns a worker's default state as of the time block date.FieldValueField NameWorker's Default State for a Time Block as of Time Block DateBusiness ObjectTime BlockFunctionLookup Value as of DateSource FieldWorker's Default State for a Time BlockEffective DateCalculated Date
- Create a calculated field that returns the state for the time block if a worker overrides the default state for the time block.FieldValueField NameOverride State for a Time BlockBusiness ObjectTime BlockFunctionLookup Related ValueLookup FieldLocationReturn ValuePrimary Address - State/Province
- Create a calculated field that returns true if a worker's default location is in XYZ State or if a worker specifies the location for the time block as XYZ State.FieldValueField NameTime Block Worked in XYZ StateBusiness ObjectTime BlockFunctionTrue/False ConditionCreate the true/false condition:And/Or(FieldOperatorComparison TypeComparison Value)And(Override State for a Time Blockis blankAndWorker's Default State for a Time Block as of Time Block Dateequal toValue specified in this filterXYZ State)OrOverride State for a Time Blockequal toValue specified in this filterXYZ State
- Create a time block conditional calculation using the calculated fieldTime Block Worked in XYZ Statethat you defined in the previous step. This calculation tags all time blocks worked in XYZ State with anXYZ Statecalculation tag.
- Access theCreate Time Calculationtask.
- For theCalculation Type, selectTime Block Conditional Calculation.
- Specify theCriteria:FieldValueTime Block ConditionsTime Block Worked in XYZ State
- Define theResults:FieldValueAdd TagsXYZ State
- On theGroupstab, specify time calculation groups so that all workers are eligible for this calculation, not just XYZ State residents.
- Access theMaintain Time Calculation Prioritiestask to assign this calculation a priority.
- Create an overtime calculation that calculates double time if a worker works more than 12 hours in a day, for both XYZ State residents and nonresidents who worked in XYZ State.
- Access theCreate Time Calculationtask.
- For theCalculation Type, selectStandard Overtime Calculation.
- Specify theCriteria:FieldValuePeriodDailyReplace Hours Greater than (value)12Time Calculation TagsXYZ State
- Define theResults:FieldValueAdd TagsDouble TimeRemove TagsRegular
- On theGroupstab, specify time calculation groups so that all workers are eligible for this calculation, not just XYZ State residents.
- Access theMaintain Time Calculation Prioritiestask to assign this calculation a priority so that it executes after the time block conditional calculation defined in Step 2.
When nonresidents work in XYZ State, they must specify which time blocks they worked in
XYZ State so that Workday includes the time blocks in the double time calculations.