Customizing Error Messages

Administrators can use the Oracle Essbase @RETURN function to customize displayed messages when a business rule calculation is terminated. For example, customize a business rule to display: "You must specify a maximum value before this calculation can successfully execute."

The business rule syntax:

@RETURN ("ErrorMessage",ERROR)

where:

  • "ErrorMessage" is an error message string, or any expression that returns a string.

  • ERROR indicates that the message indicated in the "ErrorMessage" string is displayed to the user, the Job Console, and the application log as an error type message.

Notes:

  • The business rule stops executing when @RETURN is called.

  • You can use the IF...ELSEIF calculation command block to specify logical error conditions, and use the @RETURN function to exit the calculation with customized error messages and levels.

  • You can also use the following syntax to display error message labels defined in the HspCustomMsgs localized resource file:

    • Without parameters:

      @RETURN(@HspMessage("MESSAGE_LABEL_NAME"), ERROR)
    • With parameters:

      @RETURN(@HspMessage(@NAME("MESSAGE_LABEL_NAME", "PARAM_NAME1", "PARAM_VALUE1", "PARAM_NAME2", "PARAM_VALUE")0, ERROR)

    For instructions on customizing the HspCustomMsgs file, see Customizing Text, Color, and Images.

  • You cannot use the function in member formulas.

For more information on the @RETURN function, see the Oracle Essbase Technical Reference.