25.8 AUTO_SET_ASSOCIATED_ITEM Procedure

This procedure automatically sets the associated page item or tabular form column based on a constraint contained in p_error.ora_sqlerrm.This procedure performs the following:

  • Identifies the constraint by searching for the schema.constraint pattern.
  • Only supports constraints of type P, U, R and C.
  • For constraints of type C (check constraints), the procedure parses the expression to identify those columns that are used in the constraints expression.
  • Using those columns, the procedure gets the first visible page item or tabular form column that is based on that column and set it as associated p_error_result.page_item_name or p_error_result.column_alias.
  • If a page item or tabular form column was found, p_error_result.display_location is set to apex_error.c_inline_with_field_and_notif.

Syntax

APEX_ERROR.AUTO_SET_ASSOCIATED_ITEM (
    p_error_result IN OUT NOCOPY t_error_result,
    p_error        IN            t_error );

Parameters

Parameters Description
p_error_result The result variable of your error handling function.
p_error The p_error parameter of your error handling function.

Example

See an example of how to use this procedure in Example of an Error Handling Function.