Shop Floor Time Card Validation Rules

Skip to main content

Shop Floor Time Card Validation Rules

You are here:

How to access the validation rules

Access Shop Floor Time Card Validation rules via the Business Manager Role Center, or Shop Supervisor Role Center by navigating to Shop Floor InsightConfigurationPayrollTime Card Validation Rules, or by searching for “Shop Floor Time Card Validation Rules” in the Business Central Search.

How the rules are initially populated

The validation rules are not entered manually, validation rules are created on demand by codeunit 23044110 “SFI Time Card Line Validation”.  If a violation occurs and the system code does not yet exist, it will be created at that point with a default rule code, default tokenized message, default category, and the default preferred message area.  After that, the configured rule controls the actual category and whether the message is created.

To disable a rule, do not delete it, just flag it as disabled or change the category to information only.  Deleting a rule will just cause it to be re-created.

When validation runs

Validation runs from the approval process and from explicit re-validation, this can be done manually as well with the ‘Validate’ action or the “Re-Validate” action on the Time Card Approvals page.  During validation, the code clears existing messages, records elapsed-vs-recorded time, checks total time, adds shift messages, then validates each time card line.

Columns on the page

Column Source field Purpose
Code Code Unique code identifying the validation rule.
Category Category Severity of the rule. Options are Error, Warning, Information, and Ignored. Only errors prevent validation.
Enabled Enabled Controls whether the rule creates validation entries. Options are Enabled and Disabled.
Message Message Default or configured message shown when the rule is violated.
Pattern Pattern Optional filter applied to SFI Time Card Line. If populated, the validation message is only created when the time card line matches the filter.
Message Area Message Area Identifies where the message belongs in the approval UI. Options are None, Header, Quantity, SetupTime, RunTime, WorkCenter, WorkType, CreationTime, ClockOffTime, and GeneralLine.

This mostly affect how it shows on the Time Card Approvals page.

Default Validation Rules

Code Default category Default state Default message area Default message Trigger
ElapsedRecorded Information Enabled None Elapsed Time: [Elapsed] / Recorded Time: [Recorded] Created during card validation when elapsed-vs-recorded time is recorded.
NoShift Error Enabled Header No Employee Shift Pattern defined Time card has no Employee Shift Pattern.
UnexpectedShift Warning Enabled Header Expected Shift [Expected Shift] but got [Actual Shift] Time card shift differs from the expected shift.
HoursMoreThanExpect Warning Enabled Header Total hours [Actual Hours] on the [Time Card No.] is more than the expected amount of [Expected Hours] Total time is greater than expected shift hours.
HoursLessExpected Warning Enabled Header Total hours [Actual Hours] on the [Time Card No.] is less than the expected amount of [Expected Hours] Total time is less than expected shift hours.
ShiftMessages Error Enabled Header Employee shift message text Shift messages exist for the employee/date.
InvalidActivity Error Enabled GeneralLine Activity: [Activity Code] is not valid. Time Card No.: [Time Card No.] Line No.: [Line No.] Activity code does not exist.
InvalidPaycode Error Enabled GeneralLine Paycode: [Paycode] is not valid. Time Card No.: [Time Card No.] Line No.: [Line No.] Paycode does not exist.
NoProdOrder Error Enabled GeneralLine No Production Order entered. [Time Card No.] Line No.: [Line No.] Production order line has blank Document No.
NoProdOrderLine Error Enabled GeneralLine No Prod. Order Line entered. Prod. Order No.: [Document No.] on [Time Card No.] Line No.: [Line No.] Production order line has Document Line No. = 0.
NoOperation Error Enabled GeneralLine No Operation entered. Prod. Order No.: [Document No.] Prod. Order Line No.: [Document Line No.] on Time Card [Time Card No.] Line No.: [Line No.] Production order line has blank Task No.
InvalidOperation Error Enabled GeneralLine Operation:[Task No.] is not valid for Prod. Order No.: [Document No.] Prod. Order Line No.: [Document Line No.] on Time Card [Time Card No.] Line No.: [Line No.] Operation is not valid for the released production order line routing.
NoWorkCenter Error Enabled GeneralLine No Work Center entered. Prod. Order No.: [Document No.] Prod. Order Line No.: [Document Line No.] on Time Card [Time Card No.] Line No.: [Line No.] Production order line has blank Work Center No.
MissingJob Error Enabled GeneralLine No Job/Project No. entered on Time Card [Time Card No.] Line No.: [Line No.] Job/Project line has blank Document No.
MissingJobTask Error Enabled GeneralLine No Job/Project Task entered. Job/Project No.: [Document No.] on Time Card [Time Card No.] Line No.: [Line No.] Job/Project line has blank Task No.
MissingResource Error Enabled GeneralLine Shop Floor Employee [Employee No.] must be linked to a resource to post to a Job/Project. Job/Project line has time but employee has no linked resource.
MissingAsset Error Enabled GeneralLine No Asset No. entered. [Document No.] on Time Card [Time Card No.] Line No.: [Line No.] Fixed Asset line has blank Document No.
MissingSvcOrder Error Enabled GeneralLine No Service Order No. entered on [Time Card No.] Line No.: [Line No.] Service line has blank Document No.
MissingSvcLine Error Enabled GeneralLine No Service Item Line entered. Service Order No.: [Document No.] on Time Card [Time Card No.] Line No.: [Line No.] Service line has Document Line No. = 0.
InvalidCode Error Enabled GeneralLine Missing or invalid activity code on Time Card [Time Card No.] Line No.: [Line No.] Activity code does not exist during time validation.
MissingTime Error Enabled GeneralLine No time entered on Time Card [Time Card No.] Line No.: [Line No.] Run Time + Setup Time is zero and the activity allows time entry.
NoTimeAllowed Error Enabled GeneralLine The Activity Code: [Activity Code] does allow time to be recorded on Time Card [Time Card No.] Line No.: [Line No.] Run Time + Setup Time is non-zero but the activity is marked No Time Entry.
QtyExceedsExpected Warning Enabled Quantity Total Quantity completed exceeds the expected amount of: [Input Quantity] Production output quantity exceeds remaining expected quantity.
MissingSetup Warning Enabled SetupTime Setup time was not entered Production operation expects setup time, but Setup Time is zero.
SetupExceeds Warning Enabled SetupTime Setup time exceeds the expected time of [Prod Setup Time] Setup Time exceeds expected setup time plus variance.
ProdOrderMissing Error Enabled GeneralLine The production order line or step is missing [Document No.][Document Line No.][Task No.] for on [Time Card No.] Line No.: [Line No.] Production order routing lookup fails during runtime validation.
ExpectRunTime Warning Enabled RunTime Run time was not entered Production operation expects run time, but Run Time is zero.
RunTimeExceeds Warning Enabled RunTime Run time exceeds the expected time of [Prod Run Time] Run Time exceeds expected run time plus variance.
RuntimeNotEntered Warning or Error Enabled RunTime Run time was not entered For Job/Project lines, defaults to Warning when Document No. is present and Run Time is zero. For other non-production lines, defaults to Error when both Run Time and Setup Time are zero and the activity allows time entry. The first time this rule is auto-created determines the stored default category.
WorkCenterMissing Error Enabled WorkCenter Work Center was not entered Production order line has blank Work Center No.
ActNeedsProd Error Enabled WorkType The Activity entered requires a Production Order Activity requires a production order but Document No. is blank.
ActNeedsAsset Error Enabled WorkType The Activity entered requires a Fixed Asset Activity requires a fixed asset but Document No. is blank.
ActNeedsJob Error Enabled WorkType The Activity entered requires a Job/Project Activity requires a Job/Project but Document No. is blank.
ActNeedsService Error Enabled WorkType The Activity entered requires a Service Order Activity requires a service order but Document No. is blank.
EntryAfterLogout Warning Enabled CreationTime Activity was started on [Entry Creation Time] after the logout time of [Calculated Logout Time] Entry Creation Time is after Calculated Logout Time.
EarlyClockOff Warning Enabled ClockOffTime Activity was clocked off at [Entry Clock Off Time] before login time of [Calculated Login Time] Entry Clock Off Time is before Calculated Login Time.

Important notes for administrators

Changing Category changes the severity used when future validation entries are created. The code reads the category from the configured rule before inserting the validation entry.

Setting Enabled to Disabled prevents that rule from creating validation entries.

Use Pattern carefully. It applies a Business Central table view/filter to SFI Time Card Line; if the current line does not match the pattern, the validation message is skipped.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Need help?

Leave A Comment

Table of Contents
Go to Top