TAGS

Recent Posts

Archives

Oracle APEX for Newbies: Chapter 3 – Creating an Interactive Grid for the Demo Application
Posted on May 23, 2018
Author: Tony Tauro, Performance Architects

This blog post builds on the work done in two previous blogs – Chapter 1 and Chapter 2. You could go through those or just read this one for reference.

In the last chapter, we created an expenses report (quite easily), but it had too many codes in it (e.g., the cost center field shows 101 and 103). We would like those codes to be replaced by the names of the cost centers. But, first, we want a place to maintain those names.

As you would know if you looked at our schema from Chapter 1, the cost centers are in a table called
“app_cost_centers.” We will create an “Interactive Grid” on this table which will allow us to view and edit the contents of this table from a page in our application.

  1. Just as before, login to APEX, go to the “App Builder,” and select your application to open it (the “Expenses App” from the last two chapters). Then click on the “Create Page” button.
  2. On the “Create a Page” screen, click on “Form.”
  1. On the “Create Page” screen, click on “Editable Interactive Grid.”
  2. On the next screen, enter a name for your page called “Maintain Cost Centers”. We say “Maintain” because this single page will perform create, update and delete functions. You can change the page number or use the default value. Click on “Next.”
  3. On the next screen, we will again opt to “Create a new navigation menu entry”, enter value under “New Navigation Menu Entry” and then click on “Next.”
  4. Finally, we need to specify the source. The entries on this screen should be as below:
  1. Editing Enabled: Yes
  2. Source Type: Table
  3. Table/View Owner: Name of schema where your table is
  4. Table/View Name: app_cost_centers
  5. Primary Key Column: ROWID (you can use an actual column from your table, but the ROWID pseudocolumn ( https://docs.oracle.com/cd/B19306_01/server.102/b14200/pseudocolumns008.htm ) is a good option if you want to keep things simple, which we do for now)
  6. Select all columns
    1. Click on “Create.”
  7. This creates your app. As before, you can now run it by clicking on the “Run” button in the top right corner:
  1. Your “Maintain Cost Centers” page is ready to use.
  1. Just like with the previous report, this page has an “Actions” button and all the options under that. There are additional options under the “Row Actions” button:

Feel free to explore more. The main features to notice are that you can add rows, delete rows and modify existing rows on this page. But this application has a few faults too, which we will try to address in the next chapter; for example:

  1. We want to see the name of the logged in user on the page (who said our imaginary end-user needs to be rational?)
  2. The ID field should be entitled “Cost Center ID” and should be read-only
Share
© Performance Architects, Inc. and Performance Architects Blog, 2006 - present. Unauthorized use and/or duplication of this material without express and written permission from this blog's author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Performance Architects, Inc. and Performance Architects Blog with appropriate and specific direction to the original content.

Leave a Reply

Your email address will not be published. Required fields are marked *