2 Replies Latest reply: Nov 9, 2012 9:03 AM by VC RSS

    Call a Automatic Row Fetch from a Dynamic Action

    Elena.mtc
      Hi,

      can I execute the Automatic Row Fetch from a dynamic action?

      I only found this post (Dynamic Actions to call Automatic Row Processing (DML) but the link where the solution is does not work :(

      Thanks,

      Edited by: Elena.mtc on 09-nov-2012 5:46
        • 1. Re: Call a Automatic Row Fetch from a Dynamic Action
          Elena.mtc
          I forgot to say, for several reasons, I don't want to submit the page. So that's where I find the complexity in calling the ARf.

          Thanks.
          • 2. Re: Call a Automatic Row Fetch from a Dynamic Action
            VC
            Elena.mtc wrote:
            I forgot to say, for several reasons, I don't want to submit the page. So that's where I find the complexity in calling the ARf.

            Thanks.
            You cannot fire the ARF because it is designed to run when the page is rendered and it cannot be called as a standalone

            Create a dynamic action as follows to fetch the form detials

            Action: Execute PL/SQL Code

            PL/SQL Code:
            begin
              select ename, job, mgr, hiredate, sal
                into :P4_ENAME, :P4_JOB, :P4_MGR, :P4_HIREDATE, :P4_SAL
                from emp
               where empno = :P4_EMPNO;
            exception
              when others then
                null;
            end;
            Page Items to Submit: P4_EMPNO

            Page Items to Return: P4_ENAME,P4_JOB,P4_MGR,P4_HIREDATE,P4_SAL

            See this working example: http://apex.oracle.com/pls/apex/f?p=32940:4

            Login as test/test

            If you want to make it more dynamic you can query the APEX metadata to find the form items on your current page
            select * from apex_application_page_db_items
            where page_id =:APP_PAGE_ID
            and application_id = :APP_ID;