3.2 SET_VALUE Procedure

This procedure changes the application setting value in the current application. If the setting is subscribed from another app, this API will not update the setting value. If the setting is subscribed and p_raise_error is set to TRUE, this API raises an error.

Syntax

APEX_APP_SETTING.SET_VALUE (
    p_name          IN VARCHAR2,
    p_value         IN VARCHAR2,
    p_raise_error   IN BOOLEAN DEFAULT FALSE )

Parameters

Parameters Description
p_name

The case-insensitive name of the application setting. An error raises if:

  • the application setting name does not exist
  • the build option associated with the application setting is disabled
p_value

The value of the application setting. An error raises if:

  • the value is set to required, but a null value passes
  • the valid values are defined, but the value is not in one of the valid values
p_raise_error

If set to TRUE and an error occurs, then this procedure raises an error message.

If set to FALSE, all error messages are suppressed.

In either case, this API never updates application setting values when an error occurs.

Example

The following example uses the SET_VALUE procedure to set the value of the application setting "ACCESS_CONTROL_ENABLED."

BEGIN
    APEX_APP_SETTING.SET_VALUE (
        p_name  => 'ACCESS_CONTROL_ENABLED',
        p_value => 'Y' );
END;