Oracle Apex Manually Populate a Form

I had a hard time debugging why my form does not auto populate as designed. In my design, I am using a process of type PL/SQL, which was set to be executed "On Load - Before Regions", to retrieve values for populating the form from database.
FOR C1 in (SELECT ename, sal
FROM emp WHERE ID=:P2_ID)
LOOP     
     :P2_ENAME := C1.ename;
     :P2_SAL := C1.sal;
END LOOP;
The value of P2_ID was passed from the page who is calling this form. It was suppose to change the values of P2_ENAME and P2_SAL according to the value of P2_ID. However, it does not. After switching the "source used" of P2_ID from "Always, replacing any existing value in session state" to "Only when current value in session is null". It works!

No comments:

Post a Comment

Datatable static image not found on the server

When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...