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!

Can I use a function that returns boolean in a SQL expression as server-side condition?

Eslam_ElbyalyJun 9 2021 — edited Jun 9 2021

Hi,
I am using APEX 21.1. I have a page with an interactive report with a column that I only need it to render if a specific function returns false. I created a function called g.user_is_doctor in the database and tried to use it in server-side condition> Expression> SQL like that...
(G.USER_IS_DOCTOR(P_USERID => :P9999_USERNAME) IS TRUE);
But it shows error ORA-06550: line 1, column 156: PLS-00103: Encountered the symbol "TRUE" when expecting one of the following: not null of nan infinite dangling a empty json
I used it in server-side condition> a Function Body like that RETURN G.USER_IS_DOCTOR(P_USERID => :P9999_USERNAME);
and it worked but I need to know how it works using SQL Expression especially that SQL is faster.
I need to know how it works if server-side condition -Expression-PL/SQL as well?

This post has been answered by fac586 on Jun 9 2021
Jump to Answer
Comments
Post Details
Added on Jun 9 2021
2 comments
3,271 views