How to show dynamic error message with field in Oracle apex
How to show dynamic error message with field in Oracle apex Sometimes we need to show specific error message highlighted with related field item. Below example showing if the user status is inactive during login it will show ‘Inactive User’ instead of showing ‘Invalid login’:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
declare v_user_status char(1):= 'N'; begin select STATUS into v_user_status from USER_MASTER where user_name = :P101_USERNAME; if v_user_status = 'Y' then return true; else apex_error.add_error ( p_message => 'Inactive User!', p_display_location => apex_error.c_inline_with_field, p_page_item_name => 'P101_USERNAME'); end if; |
Note: Make sure …