This discussion is archived
2 Replies Latest reply: Mar 29, 2010 4:08 AM by 543998 RSS

HRMS-Fast Formula Help

622059 Newbie
Currently Being Moderated
Hello everyone,

Iam trying to define a fast formula that would generate the customer number.

Here goes my code.

/* -------------------------------------------------------------------------------------------------------*/
/* NAME: EMP_NUMBER_GENERATION */
/* Returns the Next Employee Number. */
/*-------------------------------------------------------------------------------------------------------*/
DEFAULT FOR Person_number IS ' '
DEFAULT FOR Party_ID IS 0
DEFAULT FOR Person_ID IS 0
DEFAULT FOR National_ID IS ' '
DEFAULT FOR Date_Of_Birth IS '1900/01/01 00:00:00' (date)
DEFAULT FOR Hire_Date IS '1900/01/01 00:00:00' (date)

INPUTS ARE
Legislation_Code (text),
Person_Type (text),
Person_number (text),
Party_id,
Person_id,
Date_of_birth (date),
Hire_date (date),
National_ID (text)

Next_number = '0'
Invalid_msg = ' '
/*-------------------------------------------------------------------------------------------------------*/
/* Next test is to insure we are processing an EMPLOYEE and */
/* not an Applicant or Contingent Worker */
/*-------------------------------------------------------------------------------------------------------*/
IF person_type = 'EMP' then
(
Next_Number = Get_Custom_Number(Legislation_Code
,Person_Type
,Person_Number
,Party_ID
,Person_ID
,National_ID
,Date_Of_Birth
,effective_date)
ELSE
Invalid_msg = 'This is not an person_type of Employee!'

hr_utility.set_location('post election edit rule l_result = ' || l_result , 98765);

RETURN Next_number

When i try to verify the code it throws an error saying "The formula contains some unexpected text which cannot be verified.

Could anyone please help me as to where iam i going wrong.Or is the syntax itself is wrong.if so please provide me the corrected syntax.

Thanks,
Srikanth