7 Replies Latest reply on Nov 30, 2012 9:40 AM by Sharkie

# Correct Fast Formula syntax.

Hi

I got a Formula that uses a calculation from a function.

IF years_service > 1 THEN
(Max_Carryover = GET_KPMG_NET_CARRY_OVER(Effective_End_Date))

Now this works for a certain group of people. lets say ID 80 and 81 and wont work for ID 82

But if I change it to read
IF years_service < 1 THEN
(Max_Carryover = GET_KPMG_NET_CARRY_OVER(Effective_End_Date))

it will work for 82 and not 80 or 81. This is expected

But to incorporate everything I use

IF (years_service > 1 OR years_service < 1) THEN
(Max_Carryover = GET_KPMG_NET_CARRY_OVER(Effective_End_Date))

It will only work for 80 and 81 again and not 82.

Even if I do the following it still does not work

IF years_service > 1 THEN
(Max_Carryover = GET_KPMG_NET_CARRY_OVER(Effective_End_Date))

IF years_service < 1 THEN
(Max_Carryover = GET_KPMG_NET_CARRY_OVER(Effective_End_Date))

OR

IF years_service < 1 THEN
(Max_Carryover = GET_KPMG_NET_CARRY_OVER(Effective_End_Date))
ELSE IF years_service > 1 THEN
(Max_Carryover = GET_KPMG_NET_CARRY_OVER(Effective_End_Date))

Any clues?

Thanks
• ###### 1. Re: Correct Fast Formula syntax.
Dear Sharkie,

the 4 possible options are:

IF IS_NULL(years_service) = 'Y' THEN

ELSE IF (years_service > 1) THEN

ELSE if (years_service = 1) THEN

ELSE if (years_service < 1) THEN

try to see in which branch ID 82 falls

Regards
Giuseppe
• ###### 2. Re: Correct Fast Formula syntax.
Hi

Great. Will let you know.

Thanks
• ###### 3. Re: Correct Fast Formula syntax.
Hi

No luck. Works the same ways as the example I had a above. Its like one can only have a single item , cant have different variations of years_service. Can only be > or only be < or only be =.

• ###### 4. Re: Correct Fast Formula syntax.
Hi,
When you say it doesnt work, does it mean that the FF skips that statement or it fires it and the function doesn't give you the correct output. Please try add messages for each of the if statements and se what you get.

Thanks
• ###### 5. Re: Correct Fast Formula syntax.
Hi,
Anotherquestion I have is why you dont use ELSE.
• ###### 6. Re: Correct Fast Formula syntax.
Hi, Sharkie..
If you need to work both in cases:
1) for ID 80, 81
IF years_service > 1 THEN
(Max_Carryover = GET_KPMG_NET_CARRY_OVER(Effective_End_Date))
2) for ID 82
IF years_service < 1 THEN
(Max_Carryover = GET_KPMG_NET_CARRY_OVER(Effective_End_Date))

IF nvl(years_service, 0) <> 0 THEN
(Max_Carryover = GET_KPMG_NET_CARRY_OVER(Effective_End_Date))

Best Regards,
Changhua
• ###### 7. Re: Correct Fast Formula syntax.
End up with this and manipulating the package the funtion fed off.

IF (GET_ACCRUAL_BAND(years_service) = 0) THEN
(
IF Years_service > 1 then
(
Max_Carryover = KPMG_GET_ANNUAL_ACCRUAL(Effective_End_Date)
)
else
(
Max_Carryover = KPMG_GET_ANNUAL_ACCRUAL(Effective_End_Date)
)

)
ELSE
Max_Carryover = KPMG_GET_ANNUAL_ACCRUAL(Effective_End_Date)

Thanks