Business Requirement
Global Absence Vesting Period Formula is used when want to ensure what type of vesting ( how long will an employee accrue leave balance ) but will not be allowed to apply for a leave.
For this specific example requirement is :
We have a DFF ( Descriptive Flex Field) defined at the assignment screen which holds employee assignment type namely 'Assignee', 'OTP' , 'Resident', 'Resident -Home'.....
The Requirement is :
A) There will be no Vesting Period if
1) the current assignment is First assignment and DFF value is either 'Assignee' , 'OTP' or 'Resident'
OR
2) the current assignment is Global Temporary Assignment and DFF value is either 'Assignee' , 'OTP' or 'Resident'
B) There will be Vesting Period if
1) the current assignment is NOT First assignment and DFF value is neither of 'Assignee' , 'OTP' or 'Resident'
OR
2) the current assignment is NOT Global Temporary Assignment and DFF value is neither of 'Assignee' , 'OTP' or 'Resident'
Formula Code :
/********************************************************************
FORMULA NAME: A2F_ANC_AssigneeOTPResident_VESTING_1MONTH
FORMULA TYPE: Global Absence Vesting Period
DESCRIPTION: This sample formula removes the vesting period for Assignee/OTP/Resident
Name Date Comments
-----------------------------------------------------------------------------------------------------------------
Ashley Hardy 15-Jun-2015 Initial Version
Ashley Hardy 06-Jul-2015 Incorporate Changes Required for 'Global Temporary Assignment'
----------------------------------------------------------------------------------------------------------------
********************************************************************/
/*==============DATABASE ITEM DEFAULTS BEGIN =====================*/
DEFAULT for PER_ASG_REL_DATE_START is '1951/01/01 00:00:00' (date)
DEFAULT for PER_ASG_REL_ORIGINAL_DATE_OF_HIRE is '1951/01/01 00:00:00' (date)
DEFAULT for PER_PERSON_ENTERPRISE_HIRE_DATE is '1951/01/01 00:00:00' (date)
DEFAULT FOR PER_ASG_ATTRIBUTE5 IS ' '
DEFAULT FOR PER_ASG_ACTION_CODE is ' '
/*==============DATABASE ITEM DEFAULTS ENDS======================*/
/*================== FORMULA SECTION BEGIN =======================*/
IF ((PER_ASG_REL_DATE_START = PER_ASG_REL_ORIGINAL_DATE_OF_HIRE) OR (PER_ASG_ACTION_CODE = 'GLB_TEMP_ASG'))
THEN (
If (PER_ASG_ATTRIBUTE5 = 'Assignee')
OR (PER_ASG_ATTRIBUTE5 = 'OTP')
OR (PER_ASG_ATTRIBUTE5 = 'Resident')
then(
vestingUOM = 'M'
vestingUnits= 0
)
else(
vestingUOM = 'M'
vestingUnits=1
)
) else
(vestingUOM = 'M'
vestingUnits=1 )
/*=================== FORMULA SECTION END =======================*/
return vestingUOM,vestingUnits
Screenshot :
Click on Edit Button and then select Correct as shown :