Introduction
A little strange it may sound first time but there are business use case where-in we want to have an absence type which should allow absence recording only if done via some specific users. Those users will be able to apply the absence for everyone but no-one else should be able to record absence apart from them.
The delivered application functionality categorises users into:
- Employees
- Line Managers
- Administrators
But any further bifurcation isn’t delivered. This essentially means that an absence type can be enabled only for Administrators but we cannot restrict this to ensure that only ADMIN1, ADMIN2 can record absence against it but not all other Administrators.
In this post, we would demonstrate how we can achieve this functionality through a custom solution.
So, let’s get started.
Worked Out Example
We would have to perform a series of setups to achieve this functionality. We can break them down into the following steps:
- Create Absence Type
- Create a Custom Profile Option (Assign Values to Specific Admin Users)
- Create a Custom Table Value Set
- Create a Custom Fast Formula of Participation and Rate Eligibility Type
- Attach the Custom Fast Formula to the Absence Type Created at Step 1
- Verify Results
Create Absence Type
We will create a simple Absence Type (say “Special Leave”) and the important attribute values are mentioned in table below:
Create Custom Profile Option
We would need to create a custom profile option (SPECIALLEAVE_ABSENCE_TYPE_VISIBLE which would hold ‘N’ at Site Level and ‘Y’ for Admin Users (HCM_IMPL7 in this example) who are authorised to record absence. All other Admin users do not have a entry here and hence they should not be able to record the absence). Details of the profile option are below:
Navigation-> Setup and Maintenance->Manage Profile Options-> Create
Assign Profile Option Values
We will assign profile option values for this newly created profile option.
Navigation->Manage Administrator Profile Values->SPECIALLEAVE_ABSENCE_TYPE_VISIBLE
Create a Custom Table Value Set
We will now create a custom table type value set.
Navigation-> Setup and Maintenance -> Manage Value Sets -> Create
Create Custom Fast Formula
We would now create a custom Fast Formula of Global Absence Entry Validation Type.
Navigation-> Setup and Maintenance-> Fast Formulas -> Create
Create Eligibility Profile
We will create a “Eligibility Profile”.
Navigation->Setup and Maintenance->Eligibility Profiles->Create
Assign Eligibility Profile to Absence Type
Now we will attach the Fast Formula to Absence Type
Navigation->Setup and Maintenance -> Manage Absence Types -> Special Leave
Verifying Results
Now we will login with an ADMIN user (HCM_IMPL7) who is allowed to record absence booking for “Special Leave” and check result.
We will now login with another ADMIN user (HCM_IMPL) who is not authorized to record the absence and verify result.
We will verify the same from Employee Login (SANDY.KIM) and she would not be able to see the Absence Type too in the dropdown
And finally, when we even try as Line Manager (AMY.MARLIN) we would see that she also is not able to view the Absence Type.
Summary
So, this is how we can make use of Participation and Rate Eligibility Fast Formula to restrict visibility of an Absence Type. One can extend this logic to meet new requirements.
And with this I would end this post.
Hope this was a good read, Thanks all for your time and have a nice day ahead.
You can download the Fast Formula file from below:
SPECIAL_LEAVE_ELIGIBILITY_FF.sql