Registering a Function

You register a new function by naming and defining it, then creating contexts and parameters for it. Contexts are environment values that do not get passed to the function.

Where a function requires a mixture of contexts (from the FF_CONTEXTS table) and parameters, the contexts should be listed first in the function header followed by the function parameters. Only the function parameters, however, need to be used to call the function from FastFormula.

For example, a function requires eight values: three contexts and five parameters. All eight values are listed in the function header but only the five parameters are used to call the function.

You register the class of the function as external. External functions are further PL/SQL functions in addition to the ones already delivered with FastFormula. External functions can use contexts and parameters.

arrow icon   To register a new function for Oracle FastFormula:

  1. Enter a unique name for the new function.

  2. Select date, number or text as its data type.

  3. Select external as the class of the function.

  4. Enter an alias for the function name if you require an alternative name for it. You can also enter a description to explain what the function is for. The Alias and Description fields are both optional.

  5. Enter the definition of the function. Use the format: <package name>.<function name>.

  6. Save your entries.

arrow icon   To enter context usage and parameter information:

  1. Choose the Context Usages button.

  2. In the Context Usages window, select as many context items as you require for the function. The data type for each context displays automatically.

    Note: The functionality that calls FastFormula, that is, QuickPaint or Payroll Processing, determines what contexts FastFormula has access to from the FF_CONTEXTS table.

  3. Save your entries. The sequence number of each context is entered automatically when you do this.

  4. Close the Context Usages window and choose the Parameters button.

  5. In the Parameters window, enter the parameters, or operands, you require to define the function. Type and class display automatically.

  6. Check the Optional check box if you want the corresponding parameter to be optional.

  7. Check the Continuing check box if you want the function to make more than one call to the parameter.

    Note: You cannot define a parameter as continuing unless you also make it optional. However, an optional parameter does not have to be continuing.

  8. Save your entries.