This content has been marked as final. Show 3 replies
This will make sure that at submit time the approval_a is still there. If not, the update will fail and a process error message will be displayed to the user.
update my_approvals set approver_d = :Pxx_USER where id = :Pxxx_PRIMARY_KEY and approver_a is not null; -- If no record has been updated (because approver_a has revoked his approval) we have to raise an error to the user if sql%rowcount = 0 then raise_application_error(-20999, 'User A has revoked his approval, final approval not possible'); end if;
Member of the APEX development team
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Thanks for your response. Is there a way to write the logic for all the approvals in one onbutton click event?
Is it better if I write separate logic for each approver?
Actually my manager prefers the Java Script code for this. As I am a oracle guy, I do not have knowledge on java Script and also I am new to APEX.
Do you have a Java Script solution for this validation?
Thanks a lot for your help.
Hi 980540 (friendly user name required),
To your question about writing separate logic for each approver, I'd just write one set of PL/SQL code in the database and use that to control all the approval logic.
I'd do what Patrick suggested.