Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why APEX_ERROR.ADD_ERROR does not work in the PLSQL of a DA action

PaulPApr 6 2020 — edited Apr 7 2020

APEX V19.2

Why does the following PLSQL not work in a DA of action type PLSQL when, for example, a DA button is clicked? No APEX error is ever generated.  Validation using DAs seems to be a complicated topic for APEX for some reason. This solution works OK ( http://theperfectbeast.blogspot.com/2015/03/oracle-apex-soft-validation-using.html ) but uses an ALERT rather that proper APEX error handling.

begin


If :P1_ENAME is null then


APEX_ERROR.ADD_ERROR (

p_message  => 'The employee name can´t be null',

p_display_location => apex_error.c_inline_with_field_and_notif ,

p_page_item_name => 'P1_ENAME');


Elsif :P1_HIREDATE > sysdate then


APEX_ERROR.ADD_ERROR (

p_message  => 'The Hiredate must be less than or equal to today',

p_display_location => apex_error.c_inline_with_field_and_notif ,

p_page_item_name => 'P1_HIREDATE');


End If;

end;

thanks

PaulP

Comments
Post Details
Added on Apr 6 2020
2 comments
1,996 views