Example: Validate Holiday Time Entry
This example shows you how to create a time entry validation that references different business objects
.
The
Holiday
time entry code should only be used when workers enter time for
holidays. You need to create a validation that prevents workers from entering
Holiday
time for non-holiday days.This validation needs to reference report fields based on different business objects.
Because the rule conditions on the validations must all reference fields on the same
primary business object, you need to create a lookup related value calculated field
to reference the field on the other business object.
- Create a holiday calendar.
- Create a time entry code calledHoliday.
- Security:
- Set Up: Time Trackingdomain in the Time Tracking functional area.
- Custom Field Managementdomain in the System functional area.
- Create a lookup related value calculated field that references theIs Holidayreport field from the Time Day business object.
- Access theCreate Calculated Fieldtask.
- As you complete the task, consider:FieldNotesField NameTime Day is HolidayBusiness ObjectTime BlockFunctionLookup Related ValueLookup FieldTime Day for a Time BlockReturn ValueIs Holiday
- Create the time entry validation.
- Access theMaintain Time Entry Validationsreport.
- ClickNew Validation, next toCritical.
- In theDescriptionfield, enter:Holiday Time Entry.
- Define theRule Conditions.As you complete the task, consider:And/OrSource External Field or Condition RuleRelational OperatorComparison TypeComparison ValueAndTime Entry Codein the selection listValue specified in this filterHolidayAndTime Day is Holidayequal toValue specified in this filterLeave the check box blank.
- Add a validation message.
- Access theMaintain Time Entry Validationsreport.
- Select from the related actions menu of theHoliday Time Entryvalidation.
- As you complete the task, consider:Text/External FieldValueText"External FieldTime Entry CodeText" can only be used for holidays. Select a different time entry code for the time block onExternal FieldFormatted Calendar Date for a Time Block
When a worker attempts to enter time using the
Holiday
time entry code on a
day that is not a holiday (example: 2014-10-27), Workday displays this error
message: "Holiday" can only be used for holidays. Select a different time entry
code for the time block on 2014-10-27
.