Person Selection

This formula type can be used in most benefits batch processes to determine who should be processed by the batch process.

Contexts

The following contexts are available to formulas of this type:

  • BUSINESS_GROUP_ID ( ENTERPRISE_ID)
  • EFFECTIVE_DATE
  • HR_ASSIGNMENT_ID
  • PERSON_ID
  • LER_ID

Database Items

Use only the following database items that are available to formulas of this type:

  • All columns except attribute columns from tables: ben_ler_f
  • Database items based on person’s assignment – HR_ASSIGNMENT_ID AND PERSON_ID

Input Variables

Input variables are not available to formulas of this type.

Input variables table

Input Data Type Required Description
BEN_IV_PERSON_ID Char N Person id is passed as input value

Return Variables

Use predefined names for return variables. The following return variables are available to formulas of this type.

Return variables table

Return Value Data Type Required Description
L_OUTPUT Char Y Returns Y or N

Errors

If any other output value is returned then the participation process errors with BEN_91329_FORMULA_RETURN.

Sample Formula 1:

FORMULA NAME: BEN_PER_SEL_RULE

FORMULA TYPE: Person Selection

DESCRIPTION: The formula selects employees based on marital status, job, and work from home status.

/*=========== DATABASE ITEM DEFAULTS BEGIN =====================*/ DEFAULT for PER_PER_MARITAL_STATUS IS 'S'
DEFAULT for PER_ASG_JOB_NAME IS 'Temp'
DEFAULT for PER_ASG_WORK_AT_HOME IS 'N'
/*=========== DATABASE ITEM DEFAULTS ENDS======================*/
/*================ FORMULA SECTION BEGIN =======================*/ l_output = 'N'
l_mar_status = PER_PER_MARITAL_STATUS
l_job_name = PER_ASG_JOB_NAME
l_wrk_home = PER_ASG_WORK_AT_HOME
if ( l_mar_status = 'M'
and ( l_job_name = 'Manager' or l_job_name = 'Consultant' )
and l_wrk_home = 'Y' )
then
( l_output = 'Y' )
return l_output
/*================ FORMULA SECTION END =======================*/

Sample Formula 2:

FORMULA NAME: BEN_PER_SEL_RULE2

FORMULA TYPE: Person Selection

DESCRIPTION: The formula selects employees based on person numbers.

/*=========== DATABASE ITEM DEFAULTS BEGIN =====================*/ DEFAULT for PER_ASG_PERSON_NUMBER IS '-1'
/*=========== DATABASE ITEM DEFAULTS ENDS======================*/
/*================ FORMULA SECTION BEGIN =======================*/ l_output = 'N'
l_per_number = PER_ASG_PERSON_NUMBER
if ( l_per_number = '1138' OR l_per_number = '1139' OR l_per_number = '1140' OR l_per_number = '1141' OR l_per_number = '100023' ) then
( l_output = 'Y' )
return l_output
/*================ FORMULA SECTION END =======================*/

Sample Formula 3:

FORMULA NAME: CLOSE_PER_SELECTION_1

FORMULA TYPE: Person Selection

DESCRIPTION: Formula coded assuming 30 day enrollment window and DFLT as benefit relation name. These need to be substituted with appropriate values based on customer setup.

l_return='N'
l_eff_date = '1951/01/01 00:00:00'(date)
l_eff_date = GET_CONTEXT(EFFECTIVE_DATE,to_date('1951/01/01 00:00:00') ) l_end_date_char='NA'
l_end_date = '1951/01/01 00:00:00'(date)
l_name ='NA'
l_end_date_char = ben_fn_get_char_value(
'BEN_PER_IN_LER'
,'LF_EVT_OCRD_DT'
,' '
,' '
,'BENEFIT_RELATION_NAME'
,'DFLT'
)
l_name = ben_fn_get_char_value(
'BEN_PER_IN_LER'
,'NAME'
,' '
,' '
,'BENEFIT_RELATION_NAME'
,'DFLT'
)
/* conversion */
if (l_end_date_char <> 'NA' and l_end_date_char <> 'NO_DATA_FOUND') then
(
l_end_date=TO_DATE(l_end_date_char)
)
if ( l_name = 'Conversion' or l_name = 'Admin Maintenance')
then
(
if (l_eff_date > add_days(l_end_date,30)) then
(l_return='Y')
else
(l_return='N')
)
if ( l_name = 'Dependent Age Out' or l_name = 'Change in Day Care')
then
(
if (l_eff_date >= l_end_date) then
(l_return='Y')
else
(l_return='N')
)
return l_return