In recent version of Oracle APEX, I would like to fetch data from CUSTOMER table then set the data into the form field.
There is an edit button in Interactive Report table. When I click this button,
This form field will pop up.
Since this is an edit form, I want to retrieve the data corresponding to the ID from the customer table. In Dynamic action for this edit button, I set it like this
It only sets Customer ID in the edit customer form.
This is the table
Is there a way to set all the value from the selected row?
Yes, in fact you do not even have to write extra logic. On your form page, you just need to
add a process before-headers, pre-processing of the type Form - Initialization
. Set the form region to your form.
Set the primary key of form, which is Customer ID. This is the key the process will use to identify which record it is.
On your other page (where the IR table lives), navigate to the IR region, attributes then Link. Set this to Link to Custom Target. In the target, make sure you pass the ID from your report to form page under Set Items.
--
Since you want to add your own links, instead of using the built-in Link under your IR region,
Similar to the following (below, I selected the column of the report)
Here is a working example: https://gebqqvpozhjbqbs-apexsandboxabe.adb.us-phoenix-1.oraclecloudapps.com/ords/r/devbox/sandbox/demo-edit