How do you add an edit button to each row in a report in Oracle APEX?

Corrine picture Corrine · Jul 2, 2009 · Viewed 32.6k times · Source

I'm using Oracle APEX and I have a report region in a page that displays columns from a SQL query. I want to add edit buttons to the first column of this report so that the user can click on it and edit/review one of the results. How do I add this edit button? Thanks.

Answer

Tony Andrews picture Tony Andrews · Jul 3, 2009
  1. Add a column to the SELECT statement of the report like this:

    SELECT '' edit_link, -- This is the new column
        ...
    
  2. Go to the Report Attributes tab.

  3. Move the new column EDIT_LINK to the top of the list of columns (if you want it to be first).

  4. Click on the pencil and paper icon to the left of the EDIT_LINK alias to open the Column Attributes page.

  5. Go to the Column Link section of the Column Attributes page.

  6. Pick one of the icons shown as [Icon 1], [Icon 2], ... (alternatively you can use one of your own but that is more advanced).

  7. Fill out the remaining Link fields to specify which page of your application you want to go to when the link is pressed and what values you will be passing in. Lists of values are supplied to help with this. For example, you might specify:

    • Page: 42
    • Item 1 Name: P42_EMPNO
    • Item 1 Value: #EMPNO#

      (This would navigate to page 42, setting page item P42_EMPNO to the value of EMPNO in the current report row.)

  8. Press the Apply Changes button.

Now run the page and you will have an edit link for each row.