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!

Adding a Warning message based on a Condition

RoxyrollersAug 27 2015 — edited Aug 29 2015

Hi folks,

   I would like to add a Warning message based on a condition to notify the user that he/she should go and update a certain field. This would just be a warning message and not an Error message which is why this is not a Validation as that would throw an Error.

To achieve this, I have created a Hidden page Item P3_MESSAGE. I then created a PL/SQL block under Processing and it is after Process Row of TABLE.

declare

  v_count   NUMBER := 0;

begin

  select count(*) into v_count from patient_visit

  where  patient_id = :P3_PATIENT_ID

  and     visit_id = 0

  and     status is not null;

  if v_count = 0 then

    :P3_MESSAGE := 'Please create the First Visit for this Patient.';

else

   :P3_MESSAGE :=NULL;

end if;

end;

In the Process Success Message, I am adding a line &P3_MESSAGE.

However, when I am pressing on the Save button, I don't get any messages. Is there something I am missing or would there be a better approach to handle this scenario?

Thanks!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 26 2015
Added on Aug 27 2015
3 comments
2,007 views