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!

Conditional page redirect or alert based on PLSQL

user5108636Jan 15 2018 — edited Jan 16 2018

Hi All,

    Using APEX 5.1.3 with universal theme. I am migrating a legacy forms application to APEX. The logic to redirect to a page or show an alert is embedded in forms on click of a button as below

declare

counter number := 0;

begin

select count(*) into counter from employees where status='new';

if counter > 0 then

go_block('EMP'); --takes to a new page

execute_query;

else

--below message shows a alert message

  message('No new employees');

end if;

end;

In APEX equivalent, a similar process logic is triggered when a button is pressed and the PLSQL code executed after submit. In APEX how to implement the logic if new employees found, redirect to another page from the process's PLSQL code or else show an alert message.

Or is there is another better alternative, please advise.

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 13 2018
Added on Jan 15 2018
8 comments
868 views