Friday, 21 July 2017

Oracle Cloud Benefits - Person Change Life Event Fast Formula

Person Change Life Event Fast Formula

- Recently i had requirement of triggering life event in below cases.
(1) Change of working hours >= 30
(2) Change of working hours < 30
(3) Employees' termination or Death
(4) Salary Change

Below are the fast formulas that i have used to achieve the requirement.

(1)

/*****************************************************************************
FORMULA NAME: XX_CHG_WORKING_HOURS_GT_30
FORMULA TYPE: Person Life Changes

BEN_ASG_IN_NORMAL_HOURS  = New Value
BEN_ASG_IO_NORMAL_HOURS  = Old Value
*******************************************************************************/
INPUTS ARE BEN_ASG_IN_NORMAL_HOURS(text),BEN_ASG_IO_NORMAL_HOURS(text)

Default for BEN_ASG_IO_NORMAL_HOURS is '999'
Default for BEN_ASG_IN_NORMAL_HOURS is '999'

l_return = 'N'

IF (to_number(BEN_ASG_IO_NORMAL_HOURS) <> to_number(BEN_ASG_IN_NORMAL_HOURS) AND to_number(BEN_ASG_IO_NORMAL_HOURS)>= 30 AND to_number(BEN_ASG_IN_NORMAL_HOURS)< 30)
then
(l_return = 'Y') 
else 
(l_return = 'N')

return l_return


(2)


/*****************************************************************************

FORMULA NAME: XX_CHG_WORKING_HOURS_LT_30
FORMULA TYPE: Person Life Changes

*******************************************************************************/
INPUTS ARE BEN_ASG_IN_NORMAL_HOURS(text),BEN_ASG_IO_NORMAL_HOURS(text)

Default for BEN_ASG_IO_NORMAL_HOURS is '999'
Default for BEN_ASG_IN_NORMAL_HOURS is '999'

l_return = 'N'

IF (to_number(BEN_ASG_IO_NORMAL_HOURS) <> to_number(BEN_ASG_IN_NORMAL_HOURS) AND to_number(BEN_ASG_IO_NORMAL_HOURS)< 30 AND to_number(BEN_ASG_IN_NORMAL_HOURS)>= 30)
then
(l_return = 'Y') 
else 
(l_return = 'N')

return l_return


(3)

/*****************************************************************************

FORMULA NAME: XX_TERMINATION_LE
FORMULA TYPE: Person Life Changes

*******************************************************************************/
DEFAULT FOR PER_PER_ENTERPRISE_TERMINATION_ACTION_CODE is 'X'

L_RETURN='N'
IF (PER_PER_ENTERPRISE_TERMINATION_ACTION_CODE = 'TERMINATION' OR PER_PER_ENTERPRISE_TERMINATION_ACTION_CODE = 'RESIGNATION' OR PER_PER_ENTERPRISE_TERMINATION_ACTION_CODE ='DEATH' ) THEN
L_RETURN='Y'
RETURN L_RETURN

(4)

/*****************************************************************************

FORMULA NAME: XX_SALARY_CHG_LE
FORMULA TYPE: Person Life Changes

*******************************************************************************/
inputs are BEN_SAL_IN_SALARY_AMOUNT(text), BEN_SAL_IO_SALARY_AMOUNT(text)
default for BEN_SAL_IN_SALARY_AMOUNT is '99999999'
default for BEN_SAL_IO_SALARY_AMOUNT is '99999999'
l_create_ptnl = 'N'
If (TO_NUMBER(BEN_SAL_IO_SALARY_AMOUNT) <> TO_NUMBER(BEN_SAL_IN_SALARY_AMOUNT))
THEN
( l_create_ptnl = 'Y' )
ELSE
( l_create_ptnl = 'N' )
return l_create_ptnl


Saturday, 15 July 2017

50 US States

50 US States


  1.  California
  2. Oregon
  3. Washington
  4. Nevada
  5. Idaho
  6. Arizona
  7. New Mexico
  8. Texas
  9. Kansas
  10. North Dakota
  11. South Dakota
  12. Minnesota
  13. Iowa
  14. Missouri 
  15. ArKansas
  16. Louisiana
  17. Kentucky
  18. Tennessee
  19. Colorado
  20. Mississippi 
  21. Georgia  
  22. Florida
  23. Virginia
  24. West Virginia
  25. North Caroliana
  26. South Caroliana
  27. New jersey
  28. New York
  29. Vermont
  30. Maine
  31. Pennsylvania
  32. Rhode Island
  33. Hawaii
  34. Alaska
  35. Wyoming
  36. Michigan
  37. Illinois
  38. Wisconsin
  39. Ohio
  40. Maryland
  41. Massachusetts 
  42. Montana
  43. Utah
  44. Oklahoma
  45. Nebraska
  46. Indiana
  47. Alabama
  48. Delaware
  49. Connecticut
  50. New Hampshire

Puerto Rico - Union Territory (Important One , there are total 5)
Washington D.C. - Federal District