You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register
Get Started: AI Resources for Oracle Cloud HCM – Go Here

Progress with Redwood: Redwood Resources for Oracle Cloud HCM -  Go Here

Subtraction in Fast Formula

edited Apr 5, 2020 5:44AM in HCM Integrations 2 comments

Summary

Subtraction in Fast Formula

Content

Please refer below for the fast formula code.

MIN=9
MAX=18
INCREMENT=1

l_person_id = GET_CONTEXT(PERSON_ID,0)
l_personid = TO_CHAR(l_person_id)


l_param6 = '|=P_PERSON_ID='''||l_personid||''''

l_Value = To_NUMBER(GET_VALUE_SET('DONATION',l_param6))

IF(l_Value<=-1 and l_Value<=-18) THEN (
    MIN=0
    MAX=0
    INCREMENT=1
)
IF(l_Value<=-1 and l_Value>-18) THEN (
    MIN= 9
    MAX= 18-l_Value
    INCREMENT=1
)

Return MIN,MAX,INCREMENT

I am trying to subtract l_value from 18 it is adding the number when l_value is negative. For example if l_value is -18 then it returnsmax as 36.Please suggest how can i get the correct number.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!