The Timecard Check Rules are used to check an employee’s timecard for hours exceptions, such as reported time that is different from the scheduled hours and time posted on an unscheduled day. A TimecardCheckRuleset is added to a person’s Sign Policy and is applied when an employee or supervisor signs a timecard. See Timecard Check for more information on this feature.
Timecard Check Rules are created on the Calc Rule form. Each rule is expressed as an IF-THEN statement. The IF portion contains one or more conditions, and the THEN portion contains one or more actions. When the condition is met, the action is executed.
The individual rules are combined into rulesets using the Rulesets form. The ruleset is then assigned to the Person or Person Group's Pay Policy.
The following is a list of the available operands for the TimecardCheckRuleset context.
This operand returns the sum of all posted hours.
Parameters:
Hours Type = Indicates whether to include All posted hours, only Paid posted hours, or only Unpaid posted hours.
This operand returns the sum of all posted hours for a particular hours classification. Only events with the specified hours classifications will be considered when determining the posted hours.
Parameters:
Hours String = Enter the hours classifications, separated by commas, for which the operand should check.
This operand returns a comma-separated list of hours classifications. It is typically used in conjunction with another operand as part of a rule that only applies to specific hours classifications (see the Example below).
Parameters:
Hours Class String = Enter the hours classifications, separated by commas, that the operand should get.
Example:
IF:
Is Hours Posted on Unscheduled Day By Hours Class (Get
Qualified Hours Classes (R, O, D))
THEN:
Set Error (Error, [%PERSON_NAME%] ([%PERSON_NUM%]) posted time on an
unscheduled day, [%POST_DATE%]., False)
Determines the employee’s scheduled hours based on the employee’s Normal schedule.
Parameters:
Hours Type = Indicates which type of hours to check for on the scheduled day (Paid, Unpaid, or All).
This operand checks all the transactions in the day, week, or period that is being signed to see if any transactions require an SCA/DBA code. The operand’s parameters define the transaction fields that specify whether an SCA/DBA code required, and the transaction field that holds the SCA/DBA code.
This operand can be used as part of a rule that prevents timecards from being signed if an SCA/DBA code is missing. See Timecard Check for Missing Codes for more information.
SCA refers to the Service Contract Act and DBA refers to the Davis-Bacon Act – two federal laws that establish wage regulations for contractors.
Parameters:
The Required Field and Required Value determine whether a value is required in the Custom Field.
Required Field = This parameter defines the trans_action_map field that indicates whether the Custom Field is required (e.g., Flex Field 1).
Required Value = This parameter defines the value of the Required Field, which indicates that the Custom Field is required (e.g., Y for Yes).
Custom Field = This parameter defines the trans_action_map field that contains the required value (the SCA/DBA code).
Example:
At Acme Aerospace, if a transaction has Flex Field 1 set to Y, then the transaction requires an SCA/DBA code. These codes can be found in the field called Charge Element Value 3. Acme Aerospace does not want to sign timecards that are missing the required SCA/DBA codes.
The company’s Timecard Check Ruleset includes the rule shown below. This rule checks each transaction to see if the field called Flex Field 1 has a value of Y, indicating that the transaction requires an SCA/DBA code. The operand also checks to see if there is a value in the Charge Element Value 3 field, which is the field that has the SCA/DBA code. If the Charge Element Value 3 field is empty, an error appears at signing.
IF:
Is Any Missing Tx Map Value That Is
Req (Flex Field 1, Y, Charge Element Value 3)
THEN:
Set Error (Error, [%PERSON_NAME%] ([%PERSON_NUM%]) has a transaction
that is missing the code SCADBA001 on the following date: [%POST_DATE%],
False)
This operand checks to see if the person’s scheduled hours are less than the posted hours in a day, week, or pay period.
Parameters:
Scheduled Hours Type = Indicates whether the operand will check the person’s scheduled hours for Paid hours only, Unpaid hours only, or both paid and unpaid hours (All).
Posted Hours Type = Indicates whether the operand will check the person’s posted hours for Paid hours only, Unpaid hours only, or both paid and unpaid hours (All)
Range Check Type = Indicates whether the operand will compare the scheduled and posted hours Each Day, Each Week, or for the entire Period.
Example:
IF:
Is Hours Overreported (All, All, Each
Day)
THEN:
Set Error (Error, Overreported hours by [%PERSON_NAME%] ([%PERSON_NUM%])
on [%POST_DATE%] - Scheduled Hours: [%SCHEDULED_HOURS%], Reported
Hours: [%REPORTED_HOURS%]., False)
This operand checks to see if the person posted more than the scheduled hours for a particular hours classification in a day, week, or pay period. Only events with the specified hours classifications will be considered when determining the posted hours.
Parameters:
Scheduled Hours Type = Indicates whether the operand will check the person’s scheduled hours for Paid hours only, Unpaid hours only, or both paid and unpaid hours (All).
Hours String = Enter the hours classifications, separated by commas, for which the operand should check.
Range Check Type = Indicates whether the operand will compare the scheduled and posted hours Each Day, Each Week, or for the entire Period.
Example:
IF:
Is Hours Overreported By Hours Class
( All Hours, Get Qualified Hours Classes (R, O, D), Each Day)
THEN:
Set Error (Error, Overreported Hours by [%PERSON_NAME%] ([%PERSON_NUM%])
On [%POST_DATE%] - Scheduled Hours: [%SCHEDULED_HOURS%], Reported
Hours: [%REPORTED_HOURS%], False
This operand checks to see if the person posted any hours on an unscheduled day.
Parameters:
Hours Type = Indicates whether to check for All posted hours, only Paid posted hours, or only Unpaid posted hours on the unscheduled day.
This operand checks to see if the person posted hours on an unscheduled day for a particular hours classification. Only events with the specified hours classifications will be considered when determining the posted hours.
Parameters:
Hours String = Enter the hours classifications, separated by commas, for which the operand should check.
Example:
IF:
Is Hours Posted on Unscheduled Day
By Hours Class (Get Qualified Hours Classes (R, O, D, A))
THEN:
Set Error (Error, [%PERSON_NAME%] ([%PERSON_NUM%]) posted time on an
unscheduled day, [%POST_DATE%]., False)
This operand checks to see if the person’s scheduled hours are more than the posted hours.
Parameters:
Scheduled Hours Type = Indicates whether the operand will check the person’s scheduled hours (in the Normal schedule only) for Paid hours only, Unpaid hours only, or both paid and unpaid hours (All).
Posted Hours Type = Indicates whether the operand will check the person’s posted hours for Paid hours only, Unpaid hours only, or both paid and unpaid hours (All)
Range Check Type = Indicates whether the operand will compare the scheduled and posted hours Each Day, Each Week, or for the entire Period.
Example:
IF:
Is Hours Underreported (All, All,
Each Day)
THEN:
Set Error (Error, Underreported hours by [%PERSON_NAME%] ([%PERSON_NUM%])
on [%POST_DATE%] - Scheduled Hours: [%SCHEDULED_HOURS%], Reported
Hours: [%REPORTED_HOURS%]., False)
This operand checks to see if the person posted less than the scheduled hours for a particular hours classification. Only events with the specified hours type and hours classifications will be considered when determining the posted hours.
Parameters:
Scheduled Hours Type = Indicates whether the operand will check the person’s scheduled hours (in the Normal schedule only) for Paid hours only, Unpaid hours only, or both paid and unpaid hours (All).
Hours String = Enter the hours classifications, separated by commas, for which the operand should check.
Range Check Type = Indicates whether the operand will check the scheduled hours Each Day, Each Week, or for the entire Period.
Example:
IF:
Is Signing By (Period)
And
Is Hours Underreported By Hours Class
(All Hours, Get Qualified Hours Classes (R, O, D), Day)
THEN:
Set Error (Error, Underreported hours by [%PERSON_NAME%] ([%PERSON_NUM%])
on [%POST_DATE%] - Scheduled Hours: [%SCHEDULED_HOURS%], Reported
Hours: [%REPORTED_HOURS%]., False)
This operand checks to see if the person is signing a day, week, or period in the timecard. You can use this operand in a rule that should only apply for a specific Sign action (e.g., signing the period or signing the day).
Parameters:
Range = Select the range to check that the person is signing (Day, Period, or Week).
Example:
This rule will only be executed when the period is being signed.
IF:
Is Signing By (Period)
And
Is Hours Underreported By Hours Class( All, Get Qualified Hours Classes(
R,O,D), Each Day)
THEN:
Set Error( Error, Overreported hours by [%PERSON_NAME%] ([%PERSON_NUM%])
on [%POST_DATE%] - Scheduled Hours: [%SCHEDULED_HOURS%], Reported
Hours: [%REPORTED_HOURS%], False)
This operand shall check for any unsigned day in the specified Range Type and Offset. It will not check the time period that is being signed.
For example, the Range Type is Period and the Offset is 10. The employee is signing the week from August 8 - 14. This operand will check for unsigned days in the 10 pay periods prior to the week of August 8 - 14. If the employee has worked less than the number of Offset periods, the operand will check for unsigned days on the prior pay periods that are available.
Parameters:
Range Type = Indicates whether the operand will check for unsigned days Each Day, Each Week, or for the entire Period.
Sign Type = Indicates whether the operand will check for only Employee, Employee or Supervisor, or only Supervisor signatures.
Offset = Number of pay periods prior to the one being signed that the operand will check.
Example:
IF:
Is Unsigned Timecard In Range (Period,
10, Employee Or Supervisor)
THEN:
Set Error (Warning, [%PERSON_NAME%] ([%PERSON_NUM%]) has one or more
unsigned periods in the last 10 periods., False)
This operand checks to see if a transaction has a missing value in a field in the trans_action_map table and that two other configured fields are set to specific values.
This operand can be used as part of a rule that prevents timecards from being signed if a code, such as a Rework Code, is missing from a transaction.
See Timecard Check for Missing Codes for more information.
Parameters:
Required Field = The operand will check to see that this field from the trans_action_map table is missing a value for the transaction being processed. Available options are Charge Element Value 1-5 and Flex Field 1-5 from the trans_action_map table.
Field Containing Element Id = The operand uses this parameter to look up the transaction's charge_element_id in the charge_element_flex_field table. This parameter tells the operand which ID field in the trans_action_data table will have this charge_element_id. For example, if this parameter is set to ORDER, then the operand will look at the order_id field in the trans_action_data table. This order_id will be matched to a charge_element_id in the charge_element_flex_field table. Note that the following ID fields from trans_action_data will not be available: INDIRECT_CHARGE_CODE, MACHINE, MANAGER, and PREMIUM_CODE.
Charge Elem Flex Field = Once the record with the correct charge_element_id has been found in the charge_element_flex_field table (see above parameter), the Charge Elem Flex Field parameter indicates which Flex Field in the charge_element_flex_field table needs to be checked. This field will be checked for the value specified in the Charge Elem Flex Field Value To Test parameter.
Trans Action Map Field = This parameter specifies a field in the trans_action_map table to check for a specific value (this value is defined in the Trans Action Map Field Value To Test parameter). When the event posts, it will have a prompt containing this value mapped to the field in the Trans Action Map Field parameter. For example, a work order event may have a prompt for completion percent that is mapped to charge_element_value5 in the trans_action_map table. When the event posts, the value of the prompt for completion percent is placed in the trans_action_map.charge_element_value5 field. Available options for the Trans Action Map Field parameter are Charge Element Value 1-5 and Flex Field 1-5 from the trans_action_map table.
Charge Elem Flex Field Value To Test = This parameter is the value that the operand will check for in the Charge Elem Flex Field parameter.
Trans Action Map Field Value To Test = This parameter is the value that the operand will check for in the Trans Action Map Field parameter.
Include Zero Hour Transactions = This parameter indicates whether the rule will check transactions with a duration of zero hours when it looks for the missing field values specified by the other parameters. Select True to check zero-duration transactions or select False if you do not want to check zero-duration transactions.
Example:
A company requires that charge elements with 100% completion must have a Rework Code. If a transaction has no Rework Code and 100% completion, the following Timecard Check rule will prevent the timecard from being signed.
IF Is Transaction Map Value
Missing (Flex Field 4, ORDER, Flex Field Value 5, Charge Element Value
5, 100, 100, False)
THEN Set Error (Error, Rework Code is missing for [%PERSON_NAME%] [%PERSON_NUM%]
posted on [%POST_DATE%]: (event [%EVENT_LABEL%], [%KEY_NAME%], [%KEY_VALUE%]).,
True)
The Rework Code is mapped to the Flex Field 4 column in the trans_action_map table. The 100% completion value for the charge element is stored in Flex Field Value 5 in the charge_element_flex_field table. For a transaction, the 100% completion prompt is mapped to the Charge Element Value 5 column in the trans_action_map table.
The rule checks each transaction to see if the Required Field (trans_action_map.flex4) is empty. It then needs to check if the charge element is 100% complete. To do so, the operand looks up the charge element's order_id in the trans_action_data table (the Field Containing Element Id parameter is set to ORDER). The operand finds this charge_element_id in the charge_element_flex_field table. When it finds this record in the charge_element_flex_field table, the operand looks at flex_field_value5 (the Charge Elem Flex Field parameter) and makes sure it is set to 100 (the Charge Elem Flex Field Value To Test parameter). The operand also checks that the trans_action_map.charge_element_value5 field (the Trans Action Map Field parameter) is set to 100 (the Trans Action Map Field Value To Test parameter). Once all these conditions are true, the Set Error operand displays an error.
This operand returns the opposite of the value in the parameter.
Parameters:
Value = Enter a value in this field or right-click and choose an operand to calculate this value.
Example:
This rule will only be executed when a day or week is being signed.
IF:
Not (Is Signing By (Period))
And
Is Hours Underreported (All, All, Each Day)
THEN:
Set Error (Error, Underreported hours by [%PERSON_NAME%] ([%PERSON_NUM%])
on [%POST_DATE%] - Scheduled Hours: [%SCHEDULED_HOURS%], Reported
Hours: [%REPORTED_HOURS%]., False)
This operand defines the message that will be displayed to the user when an hours exception is found while signing the timecard. The parameters determine whether the user will be able to continue signing; define the actual message text; and determine whether the error/warning will be stored in the Error Log.
Parameters:
Error Type = If you select Warning, the Error Message will display to the person signing the timecard, but the timecard will be signed. If you select Error, the Error Message will display to the person signing the timecard and the timecard will not be signed.
Error Message = Enter the text of the error message in this field. You can specify the person, post date, type of hours, and other values in the error message using the semantics listed below.
Log Violation = Select True if you want the Error or Warning to be stored in the Error Log. Select False if you do not want the Error or Warning to be stored in the Error Log. In the Error Log form, the Timecard Check errors will display Error Code 11682 and the Description column will display the actual error message.
Semantics for Error Message Parameter:
[%PERSON_NAME%] – Displays the person’s First Name and Last Name as defined on the Employee form.
[%PERSON_NUM%] – Displays the Person Number defined on the Employee form.
[%POST_DATE%] – Date the exception occurred. If the rule is checking a pay period or week (Range Check Type = Period or Each Week), the Post Date semantic would not apply.
[%START_DATE%] – Start date of the pay period or week that is being signed. If the rule is only checking a Day (Range Check Type = Day), the Start and End Date semantics would not apply.
[%END_DATE%] – End date of the pay period or week that is being signed. If the rule is only checking a Day (Range Check Type = Day), the Start and End Date semantics would not apply.
[%SCHEDULED_HOURS%] – Number of scheduled hours based on the person’s Normal schedule for the range being checked (day, week, or period).
[%REPORTED_HOURS%] – Number of hours posted during the range being checked (day, week, or period).
The following semantics can only be used if the Set Error operand is used in a rule with the Is Transaction Map Value Missing operand:
[%EVENT_NAME%]
[%EVENT_LABEL%]
[%KEY_NAME%]
[%KEY_VALUE%]
[%START_TIMESTAMP%]
[%END_TIMESTAMP%]
[%START_ROUNDED_TIMESTAMP%]
[%END_ROUNDED_TIMESTAMP%]
[%TRANS_ACTION_ID%]
Example:
An error message that is displayed in the rule as:
Overreported hours by [%PERSON_NAME%] ([%PERSON_NUM%]) on [%POST_DATE%] - Scheduled Hours: [%SCHEDULED_HOURS%], Reported Hours: [%REPORTED_HOURS%].
Will appear to the user as:
Overreported hours by Joe Smith (1101) on 09/15/2015 - Scheduled Hours: 8.0, Reported Hours: 8.5.
This THEN operand will stop processing all rules in the ruleset for the person and post date, even if there are more rules in the ruleset that are sequenced after this rule.
Example:
This rule is included in a ruleset that will only be executed when the Period is being signed (not the Day or Week). None of the other rules in the ruleset will be executed unless the Period is being signed.
IF:
Not (Is Signing By ( Period))
THEN:
Stop Processing
This operand always returns a value of True. If you want to make sure that a rule is executed in all circumstances, create an IF clause with only the True operand.