Creating a Formula Field Example

This topic provides an example of creating a formula field. For general information about creating formula fields, see Creating Formula Fields.

Suppose, for example, you want to display the remaining credit available to a customer on the customer record. Create a custom entity field of the type Currency called Remaining Credit. Apply the field to the Customer record and set it to display on the Financial subtab. Define the field with the following formula in the Validation & Defaulting subtab:

{creditlimit}-nvl({balance},0)

(where creditlimit and balance are standard customer fields and the nvl NULL handling function forces the value to be set to the second parameter when the field is NULL)

Make sure that you enable the Formula field and clear the Store Value box to ensure that the value is always dynamically recalculated as a formula.

When a customer record is viewed, the Remaining Credit field returns a calculated value based on the credit limit and customer balance fields.

For an additional detailed example of creating a formula field, see Example of Creating a Formula Field (SuiteAnswers ID 1014946).

Related Topics

General Notices