Updating a table with the hidden primary key
The
APEX_ITEM
API is a PL/SQL package that you can use to programmatically put items on the screen. The package also contains a function to put hidden items on the screen. Hidden items are items that are placed in a webpage but are not visible. However, they can contain a value. In this way, you can make each row in a report unique. We will make an updatable report which makes use of the APEX_ITEM
API.
Getting ready
Make sure you have access to the table APP_EVENTS
.
How to do it...
First, we will make a classic report based on the APP_EVENTS
table.
In the Application Builder, click on the Create Page button.
Select Report.
Select Classic report.
Enter a name for the page and click on Next.
Select Do not use tabs and click on Next.
In the text area, enter the following query:
select apex_item.hidden(1,id)||apex_item.text(2,event) appevent , apex_item.date_popup(3,rownum,event_date,'dd-mm-yyyy') event_date , apex_item.text(4,location) location ...