0
votes

I have a dynamic action that executes PL/SQL procedure and my DA has a check to see if specific page items are not null. If it is null, the procedure will not be executed and I want to display a message to the user. Ideally I's just add a server-side condition to my DA but the issue is that I need to, somehow, notify the user. I tried using APEX_ERROR and display error message inline in notification but that did not work - message does not get displayed.

IF :P1_ITEM1 IS NOT NULL AND :P1_ITEM2 IS NOT NULL AND :P1_ITEM3 IS NOT  NULL 
THEN
    MY_PROCEDURE();
ELSE
    APEX_ERROR.ADD ERROR( p_message => 'Some required fields are NULL',
                          p_display_location => apex_error.c_inline_in_notification);
END IF;

How can I display a notification to the user if the condition is not met?

1

1 Answers

0
votes

The apex_error package is only relevant for page submission.

To display a message from a dynamic action, you need to define the action yourself.

I send the output string to a global page item, add it to page items to return. There is a dynamic action on my common item that displays that item's value as a notification.