Oracle Fast Formulas - Chapter 7: Understanding Inputs and Outputs in Fast Formulas
Objective of This Chapter
This chapter explains how Inputs and Outputs work inside Oracle Fusion Fast Formulas, how to define them properly, and why they are critical for successful formula execution.
What are Inputs
-
Inputs are variables or values that your formula uses.
-
Inputs are passed to formulas from outside systems like Payroll, Benefits, or Absence modules.
-
Without inputs, a formula cannot calculate dynamic results.
How to Define Inputs
Inputs must be declared at the beginning of your formula using the INPUTS ARE keyword.
Example:
Here:
-
salary
is a number input. -
bonus_percentage
is a number input. -
joining_date
is a date input.
Default Values for Inputs
Always set a default value for each input using the DEFAULT FOR keyword.
Example:
This ensures your formula does not break when an input value is missing.
Types of Inputs
Type | Example |
---|---|
Numeric | salary, overtime_hours |
Text | grade_code, job_title |
Date | joining_date, termination_date |
What are Outputs
-
Outputs are final results that a formula gives back.
-
Outputs are passed back to the system that called the formula.
-
Example: Bonus amount, Eligibility status, Leave balance etc.
How to Define Outputs
You define outputs using the RETURN keyword.
Example:
Here, bonus_amount
will be sent back to Payroll or whichever process is calling the formula.
You can RETURN multiple values if your formula type allows it (like absence formulas).
Example for multiple returns:
Rules for Inputs and Outputs
Rule | Reason |
---|---|
All inputs must have default values | To avoid NULL errors |
Use meaningful names for inputs | Makes formula easier to understand |
Always RETURN at least one output | Otherwise formula execution fails |
Match data type correctly | Numeric input should not be treated as text |
Example Fast Formula
Best Practices
-
Keep the number of inputs limited to only what is necessary.
-
Always document what each input and output is doing in the comments.
-
Validate input values inside the formula before using them.
Mini Practice Quiz
-
What keyword is used to declare inputs in Fast Formulas?
A INPUTS ARE
B INPUT VARS
C READS
Answer: A INPUTS ARE
-
What happens if an input is missing and no default is set?
A Formula succeeds
B Formula fails
C System uses previous value
Answer: B Formula fails
-
How do you send the result back in a formula?
A RETURN
B SEND
C OUTPUT
Answer: A RETURN
No comments:
Post a Comment