Length of Service Date to Use
This formula type is used to determine the date that will be used in the calculation of length of service.
Contexts
The following contexts are available to formulas of this type:
- BUSINESS_GROUP_ID ( ENTERPRISE_ID)
- EFFECTIVE_DATE
- HR_ASSIGNMENT_ID
- PGM_ID
- PL_ID
- PER_IN_LER_ID
- LER_ID
- BENEFIT_RELATION_ID
- PL_TYP_ID
- OPT_ID
- ORGANIZATION_ID
Database Items
Use only the following database items that are available to formulas of this type:
- Database items based on person’s assignment: HR_ASSIGNMENT_ID AND PERSON_ID
Input Variables
The following input variables are available:
Input | Data Type | Required | Description |
---|---|---|---|
BEN_IV_PERSON_ID | Number | N | PersonID of the participant |
BEN_IV_RT_STRT_DT | Date | N | Rate start date |
BEN_IV_CVG_STRT_DT | Date | N | Coverage start date |
Return Variables
The following return variables are available to formulas of this type. Any name can be used.
Out Variable Name | Data Type | Remarks |
---|---|---|
L_OUTPUT | Date | Date to be used while calculating the length of service |
Sample Formula 1:
FORMULA TYPE: Length of Service Date to Use
Description: Use the date stored in the Descriptive flex field.
DEFAULT FOR PER_ASG_ATTRIBUTE_DATE3 IS '1951/01/01 00:00:00'(DATE)
DEFAULT FOR PER_REL_ORIGINAL_DATE_OF_HIRE IS '1951/01/01 00:00:00'(DATE)
l_return = '1951/01/01 00:00:00'(DATE)
IF (PER_ASG_ATTRIBUTE_DATE3 WAS NOT DEFAULTED) THEN
(
l_return = PER_ASG_ATTRIBUTE_DATE3
)
ELSE
(
l_return = PER_REL_ORIGINAL_DATE_OF_HIRE
)
RETURN l_return
Sample Formula 2:
FORMULA TYPE: Length of Service Date to Use
Description: Use the hire/adjusted service date.
DEFAULT FOR ACP_HIRE_DATE IS '1951/01/01 00:00:00' (date)
DEFAULT FOR PER_ASG_REL_ADJUSTED_SVC_DATE IS '1951/01/01 00:00:00' (date)
l_pps_date = ACP_HIRE_DATE
l_return = l_pps_date
IF PER_ASG_REL_ADJUSTED_SVC_DATE WAS NOT DEFAULTED THEN
(
l_adjusted_svc_dt = PER_ASG_REL_ADJUSTED_SVC_DATE
if (l_adjusted_svc_dt < l_pps_date) then
(
l_return = l_adjusted_svc_dt
)
)
RETURN l_return