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!