Oracle Apex: Passing parameters to an Application Process from an Interactive report

 Requirement

There are numerous posts on calling application processes, but it's harder to find information on calling from an interactive report. 

The code of the application process is irrelevant here, but I will post enough to show you how to use the parameters.


Solution

In your interactive report (IR), have a link from one of your columns. Ensure that the query for your IR also has the columns for the other parameters that you require.

Let's say that your IR is on page 5, define the link as follows:


In other words, you're going to call your page back, passing 3 values from your query to these 3 fields so that they can be called by your application process.

Here is the important bit!



Now define your application process in shared components. Mine is called fetch_attachment, matching the call above.


 The code isn't important for the purposes of this post, but in it I reference the values on page 5 that are set by the link.

....

SELECT part_data,

           Substr(part_type, 1, Instr(part_type, ';') - 1)

    INTO   vblob, vmimetype

    FROM   (table_name)

    WHERE  message_id = :P5_MESSAGE_ID

           AND part_id = :P5_PART_ID;

...


Hope that helps.




Comments