7 Replies Latest reply: May 28, 2013 10:06 PM by Pawankumar630817-Oracle RSS

    Calling Fast formula wihtin a fast formula

    1001876
      Hi,

      I am working on fast formulas in fusion.
      I have a fast formula which makes use of other fast formula code.
      Is there any way to call one fast formula within the other.
      Please help.
        • 1. Re: Calling Fast formula wihtin a fast formula
          user800374
          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#F294842AN12C60

          You can access all of the Fusion HCM Guides from the Documentation Library: http://docs.oracle.com/cd/E37583_01/nav/hcm.htm.
          • 2. Re: Calling Fast formula wihtin a fast formula
            1001876
            Thanks. But How exactly should the contexts be passed from one formula to another.
            Need help on this.
            • 3. Re: Calling Fast formula wihtin a fast formula
              user793175-Oracle
              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.

              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.
              • 4. Re: Calling Fast formula wihtin a fast formula
                Pawankumar630817-Oracle
                If Formula A calls Formula B, there are two things here:-

                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)
                EXECUTE('Formula_B')


                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
                • 5. Re: Calling Fast formula wihtin a fast formula
                  1001876
                  Thanks. In my case calling and called formulas were of the same type type. So contexts were implicitly passed.
                  No extra effort was required.
                  • 6. Re: Calling Fast formula wihtin a fast formula
                    -Micha
                    Hi,

                    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).

                    Micha
                    • 7. Re: Calling Fast formula wihtin a fast formula
                      Pawankumar630817-Oracle
                      It is same after Rel4 as well.