In uDesigner, you can create formulas for fields in order to calculate the value of the fields and display the values, during runtime. The calculated fields are read-only fields. You can also build composite fields that combine string text data elements into one field. Formulas can be created for Numeric, String, and Date fields.
Note: The advanced formula is not available for the Summary Payment Application (SPA) SOV type BPs (Base Commit Type BP Line Item, Change Commit Type BP Line Item) and Payment Application Business Processes.
In Unifier, you can go beyond simple arithmetic functions and use expression languages when developing formulas.
The advanced formula supports:
- If-then-else conditions on string, numeric, and date DEs
- Complex conditions, for example: ((a or b) and (c and d)) or (e and f)
Note: You can edit, or update, the fields that are a part of an advanced formula definition. The advanced formula fields get re-evaluated after a successful update.
Adding Advanced Formula
The field is an input text field that is editable and required.
You can either type in the Data Element name while building the formula or insert the data elements and functions using their respective fields.
There is no limit to the maximum number of characters allowed in the formula definition field.
Commonly used keyboard shortcuts such as Ctrl+C, Ctrl+V, Ctrl+Z, Ctrl+Y, Ctrl+A, and so forth, will be supported. You can copy and paste the content from other formulas on to the formula that you are designing.
When the formula definition passes error checks, the validation result box will have the following message:
"There is no syntax error in the formula definition. However, there might be calculation errors. The "Sample Calculations" tab is now available next to the Definition tab. Oracle recommends that you review the sample data and fix any calculation errors before saving the formula definition."
Sample Calculations tab
The Sample Calculations tab will enable you to look at possible calculation errors resulting from the formula definition.
All of the fields that make up the formula definition will be seen as columns in the grid. Sample data will be generated based on the data type.
If there are any errors, then the error column will be populated with the error message. Unifier does not have control over the error messages seen.
A user can modify the content of the sample fields and post-cell focus, the values will be recalculated.
An additional Error Check is also provided for the user to re-verify for errors.
The sequence of the columns seen is based on the formula definition.
If the user chooses to save the formula in spite of the formula having calculation errors, then the following alert will be seen: There are some calculation errors. Do you still want to save the formula?
Note: When formulas cannot be evaluated, Unifier will try to evaluate the formula. In case the formulas cannot be evaluated, then Unifier will set the following values:
- String = blank;
- Date = blank,
- Numeric = blank or 0
Runtime
You can place fields that have advanced formula definition, and evaluate the definitions during runtime, in:
- The business process forms, line item detail form and in grid.
- The business process logs and line item logs.
- The field value: Any time a field value that is part of the formula definition is changed, per below, the destination formula will also get evaluated:
- Manual edits to data
- Web service methods (REST only)
- Mobile app
- When formula fields are used as search parameters in the BP log and Line Item list log, the records will be returned correctly.
- Any form-level validation (the upper form or detail form) which may have designed based on the fields that have advanced.
The following explain the functions and their available formats.