I'm working with APEX 19.2. I'm trying to handle constraint errors with an error handling function.
I have an interactive grid built on a table with unique constraint. I created constraint_lookup
that matches constraint name with message.
I created a function mainly based on Oracle Doc example (that is for example in package wwv_flow_error_api)
The only thing I changed was the display location:
l_result.display_location := case
when l_result.display_location =
apex_error.c_on_error_page then
apex_error.c_inline_with_field_and_notif
else
l_result.display_location
end;
Right now when I'm trying to add a value with non-unique value I get a message in notification like I wanted, but I don't know how to handle it to show error in notification and with the field (like in apex validation, where you can associate item)
I tried to list all apex_error attributes and I get
p_error
message ORA-00001: naruszono więzy unikatowe (#CONSTAINT_NAME#)
additional_info
ORA-00001: naruszono więzy unikatowe (#CONSTAINT_NAME#)
display_location ON_ERROR_PAGE
association_type
page_item_name
region_id
column_alias
row_num
model_instance_id
model_record_id
apex_error_code
original_message
original_additional_info
ora_sqlcode -1
ora_sqlerrm ORA-00001: naruszono więzy unikatowe (#CONSTAINT_NAME#)
error_backtrace
error_statement "ADM"l_result
message #ERROR MESSAGE#
additional_info ORA-00001: naruszono wiezy unikatowe (#CONSTAINT_NAME#)
display_location INLINE_WITH_FIELD_AND_NOTIFICATION
page_item_name
column_alias
How to connect field from constraint with the field in interactive grid?