For more information, please refer to this announcement explaining best practices for getting answers to questions.
Fast Formula to base on user mode
Content
Hi everyone,
I have searched a fast formula which can based on user mode to apply different validation, as below
DEFAULT FOR PER_ASG_PERSON_NUMBER IS 'X'
DEFAULT FOR ANC_ABS_ENTRS_USER_MODE is 'XXXX'
INPUTS ARE IV_START_DATE,IV_END_DATE,IV_TOTALDURATION
ln_person_number = PER_ASG_PERSON_NUMBER
lc_user_mode = ANC_ABS_ENTRS_USER_MODE
lc_admin = 'ADMIN'
lc_mgr = 'MGR'
lc_emp = 'EMP'
lc_default = 'XXXX'
VALID = 'N'
ERROR_CODE = 'W'
ERROR_MESSAGE = 'Value of lc_user_mode is: ' || lc_user_mode
RETURN VALID,ERROR_CODE,ERROR_MESSAGE
While when I use the above formula to return the user mode in add absence (by employee) and manage absence (by HR admin), the the same error message the shown in both HR and Emp, and the return value is XXXX instead of the expected user mode (EMP, HR admin...etc.)