Subtraction in Fast Formula — Cloud Customer Connect
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 with Redwood: Oracle Cloud SCM and Purchasing

Subtraction in Fast Formula

edited Sep 5, 2020 12:10AM in Benefits 1 comment

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.

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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