This content has been marked as final. Show 7 replies
Yes. Please review the section 'Calling a Formula From a Formula' in the Oracle Fusion Fast Formula User Guide. See: http://docs.oracle.com/cd/E37583_01/doc.1116/e36894/F823032AN112E5.htm#F294842AN12C601 person found this helpful
You can access all of the Fusion HCM Guides from the Documentation Library: http://docs.oracle.com/cd/E37583_01/nav/hcm.htm.
Thanks. But How exactly should the contexts be passed from one formula to another.
Need help on this.
1. The context values can be implicitly passed from the calling formula. If the calling formula has set contexts A, B, and C then these settings are passed to the called formula.1 person found this helpful
2. You can set the context value explicitly in the nested formula call.
If you are doing the separate API calling model (SET_INPUT, EXECUTE, GET_OUTPUT) then this can be done in a SET_INPUT call.
If you are doing the single API call (CALL_FORMULA) then you can do use the > operator for setting an input.
In both cases, the input name is the context name.
If the calling formula type does not support the context then the input is treated as an ordinary formula input and not a context.
If Formula A calls Formula B, there are two things here:-1 person found this helpful
If both Formula A and Formula B are of same formula type(i.e. Oracle Payroll, Payroll Access to HR etc), then you don't need to pass contexts to the called formula. Contexts should be automatically available in the called formula and you need not to pass them.
If both formulas are not of same formula type, then you can pass context value as a input value to the called formula like below:-
For example, you need to get value of context 'ABC' in formula B from formula A then you can get in this way
ABC_VALUE = GET_CONTEXT(ABC,' ')
SET_INPUT ('L_ABC', ABC)
In formula B, you should take value of L_ABC as a input value
Inputs are L_ABC (text)
This way you can use value of context ABC from Formula A in Formula B
Hope this helps
Thanks. In my case calling and called formulas were of the same type type. So contexts were implicitly passed.
No extra effort was required.
just one additional thing to remember:
The parent formula only passes the contexts to the child formula which are also used in the parent formula.
If you don't use a context in the parent formula, the child won't have it set.
All you need to do to fix that is read it out once in the parent with GET_CONTEXT or use it within a DBI or function.
(At least this was the case as of Rel 4. No reason to believe this would have changed).
It is same after Rel4 as well.