# Learn the Basics: How to Get Started with the APEX Animal Shelter App

<mark>This is a beginner's app designed to help understand how an app works, not a fully developed Apex app for production, with non-normalized tables, sample data, and suboptimal relationships, intended solely for learning purposes on what, when, and how to do basic things in Apex.</mark>**<mark>This blog is a continuation of my previous blog: "</mark>**[**<mark>APEX, ORDS, and TOMCAT INSTALLATION</mark>**](https://panigrahisantosh.com/apex-ords-and-tomcat-installation)**<mark>." If you haven’t checked that out, I recommend reviewing it also first for a smoother setup experience.</mark>**

**Disclaimer:** This blog is inspired by the **J Kreie Database** YouTube channel ([www.youtube.com/@databasetopics](http://www.youtube.com/@databasetopics)) [video playlist](https://youtube.com/playlist?list=PL1MJdy9N8XJLLs-4IGpEPet-7MJf4HUic&feature=shared). It is created **solely for informational and personal reference purposes**. I highly suggest going through this playlist before reading this blog, where Kreie has explained everything in a crystal clear manner. The content has been adapted for my own learning and documentation. If you find it helpful, that's great—but please note that this is not an official guide. Always refer to the original source for authoritative information.

### <mark>Create ANIMAL_SHELTER schema and required DB objects in DEMO PDB</mark>

* Download resources: [Google Drive Link](https://drive.google.com/drive/folders/1NzeOPTnrq2nd9GkjEHdI_p4TBQ8foxWC)
    
* Create tablespace named **APEX** (skip if already exists): SQL
    
    ```sql
    create tablespace apex datafile 'E:\app\oradata\ORCL\demo\apex.dbf' size 300m autoextend on next 10m;
    ```
    
    Update `create_schema.sql` with your prefered password and tablespace name to `APEX`
    
* Connect to `SYS@DEMO` and run `@create_schema.sql` (DEMO is PDB here).
    
* Verify user ANIMAL\_SHELTER created from dba\_users.
    
* Modify `@create_animal_shelter_tables.sql` by changing tablespace name to `APEX` for all create table statement.
    
* Verify all require tables are created and empty:
    
    ```sql
    SELECT * FROM ZIPS;
    SELECT * FROM PERSONS;
    SELECT * FROM EMPLOYEES;
    SELECT * FROM ANIMALS;
    SELECT * FROM TRANSACTIONS;
    SELECT * FROM ACTIVITIES;
    ```
    
    ### <mark>Create ANIMAL SHELTER workspace and require user accounts for application</mark>
    
    Login to **ADMIN@INTERNAL** workspace at [localhost:8080/ords](http://localhost:8080/ords).
    
    Create a workspace called "**Animal Shelte**r" by clicking "**Create Workspace**" or **managing workspaces → create workspace**. For "Reuse existing schema," select Yes, and for "Schema Name," choose ANIMAL\_SHELTER. On the next page, enter the admin name as **AS\_ADMIN** and fill the necessary details to create the workspace.
    
    **Note:** INTERNAL is the main workspace, and you should use **ADMIN@INTERNAL** for overall administration of APEX, such as creating and managing other workspaces. Typically, for development or admin tasks, we log in to a specific workspace. workspace contains all the design elements for the web application in this project. It's always a good idea to add a description for the workspace.
    
* Click on **Manage Workspaces -&gt; Manage Workspace to Schema Assignments** to check if the new workspace appears.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742478568094/b57df2bf-fe18-44bb-b3c3-66cf2c0ab8a9.png align="center")
    
    Similarly, click on **Manage Developers and Users** to confirm the admin user AS\_ADMIN is created.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742478620801/83777bad-f060-4f1b-81ac-aaa0291d9dca.png align="center")
    
* Now, log in to the new **Animal Shelter workspace** as the workspace administrator **AS\_ADMIN** to create **two types of accounts: i. Developer and ii. Regular User**.
    
    To create an account, select **Manage Users and Groups from the dropdown → Create User → Fill in all details**. For the name, use **AS\_DEVELOPER** (make sure the schema is ANIMAL\_SHELTER). Select No for "User is Workspace Administrator" and Yes for "User is a Developer." For this exercise, set "Require change of password" to No, though typically it is set to Yes. → Click on Create and Create Another → Create user **AS\_USER** (make sure to select No for both "Is admin" and "Is dev"). (Note: The email doesn't need to be valid, but it is mandatory.)
    
* Verify all these 3 users created (manage users and groups → Users).
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742478870510/fdc0ed12-4986-4521-8a79-f9f399ab1b15.png align="center")
    
    ### <mark>Use SQL Workshop in APEX to run scripts that insert data into tables</mark>
    
    Now log in to the Animal Shelter workspace with the developer account to view an overview of the Animal Shelter APEX WS, including the App Builder, SQL Workshop, Team Development, and Gallery. Run scripts to populate tables and perform other necessary tasks. Verify the created or modified objects from the object browser.
    
* Log in as\_developer to Workspace -&gt; SQL Workshop -&gt; SQL Scripts -&gt; upload -&gt; choose file -&gt; upload. Select all files that start with insert\_data (Warning: don't run them yet; they need to be run in order).
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742479018304/18126fff-08e9-4ecf-93c4-fc7e15b420b3.png align="center")
    
    Before choosing the order for inserts, check the ERD to find tables that are on the "one" side of a relationship. In this case, the ZIPS table is populated first, followed by the others in this order: zip -&gt; persons -&gt; employees -&gt; animals -&gt; transactions -&gt; activities. For activities, import from the ACTIVITIES\_DATA.csv file using **SQL Workshop -&gt; Utilities -&gt; Data Workshop -&gt; Load data**.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742479164703/ee2e41b7-fbf3-4c94-83d2-fc38f192a7b7.png align="center")
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742479110614/4f114165-93d4-4fa8-ac4b-84c78e200229.png align="center")
    
    While running, we expect 2 errors for `insert_data_transaction`. You can find this order at the end of `drop_animal_shelter_db.sql` (it's reversed in this file since they are delete statements). You can refer to `ANIMAL_SHELTER@DEMO.pdf` for the ERD, or alternatively, you can get it from SQL Developer by going to File -&gt; Data Modeler -&gt; Import -&gt; Data Dictionary, and so on.
    
    ### <mark>Create an application with Application Builder. Add a logo &amp; Create a simple form. .</mark>
    
* Log in again as AS\_DEVELOPER and create an application called **Daily Operations** from the App Builder. Go to **App Builder -&gt; Create Application -&gt; Choose required details** (let's keep everything as default for this app, like Theme as Standard Vita, Navigation side menu, Authentication as Application Express Accounts, etc.). Now run the application with the required credentials.
    
    Note: When APEX creates an application, it generates a Global Page, home page, login page, and others in recent versions.
    
* Now, try to change the title bar image . From the developer toolbar, click on **Application -&gt; Shared Components -&gt; under the Files and Reports section, click Static Application Files -&gt; Create File -&gt; drag and drop the file Animal\_Shelter\_text.jpg** for the title logo. Once uploaded, **copy the reference** for the uploaded image file, which is usually like **#APP\_FILES#Animal\_Shelter\_text.jpg**.
    
    Now go back to **Shared Components** -**&gt; From User Interface, select User Interface Attributes -&gt; check for the menu Logo and select the Image tab -&gt; replace the text for the label Logo with the one you just copied #APP\_FILES#Animal\_Shelter\_text.jpg -&gt; Apply Changes -&gt; Run Application**.
    
    **#APP\_FILES#** indicates where to find the image within the workspace itself.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742479314767/84d8f202-cd2f-408f-8950-3d9ad47fee45.png align="center")
    
* Now we can add components like a form, IR, CR, or IG to the page. To create a form, find a table that shows a lot of relevant information on its own, such as "persons" or "animals," rather than "transactions" or "activities."
    
    To create a page and add a component to it, **go to the Dev toolbar and select Application -&gt; Create Page -&gt; choose the Interactive Grid component -&gt; enable form -&gt; fill in the required details -&gt; next, select PK -&gt; Create Page**.
    
    Below is a screenshot showing the application page with a form and a classic report. The Interactive Grid is named ***List of Animals*** and the form is named ***Animal Info.*** Now, we'll use the form to add a new record for Rocky and see it in the report as Animal ID 10075.
    
    Note: A report displays, filters, and sorts data, while a form creates and modifies data, and in IG you can edit records inline without a form if it's not enabled, but in IR you must use a form to edit records.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742477124465/792de347-0579-4312-8c49-4539bb6634dc.png align="center")
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742477740823/2b698758-5073-49b1-a2d8-a5a285b09123.png align="center")
    
    To see Animal ID column in report we have to below change
    
* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742477972879/982fdb2e-b444-448b-ac60-22320dda6712.png align="center")
    
* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742477981228/3bd83fe9-4ea9-4f69-ba20-32dee87d3d7a.png align="center")
    
* ### <mark>Page Designer. Show PK in a form. See source of a Item. Create lookup table</mark>
    
* In the page designer, there are three sections: Rendering, Layout, and Properties, with the Layout section, known as the canvas, being where we actually work. When you select a component in rendering, you can view its corresponding item properties in the item section and the page layout in the layout or canvas section.
    
    \[Page designer from APEX 19.1\]
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742395317279/ce781d24-f79e-4c2f-a6ed-c329a8af5458.png align="center")
    
    \[Page designer from APEX 24.2\]
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742395671802/4319ebdb-f4f6-4b2a-86d2-b14750fc3952.png align="center")
    
    Normally, you don't see the PK in a form because the PK attribute item property is set to hidden, but you can make it visible by selecting Display Only. It's also recommended to change the label name from "New" to something more appropriate and meaningful, like "Animal ID (PK)," otherwise the disabled PK field will display with the label "New" inside, as shown in the third screenshot.
    
    \[After label change\]
    
* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742477702704/2d5afbda-b2f0-44d1-91e2-2cce96928c8f.png align="center")
    
    \[See source of selected Item\]
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742397286206/cb23f604-6ede-4303-9c36-a504b5bbea7e.png align="center")
    
* Sometimes we need to provide an input list to ensure that people don't add animals incorrectly or modify their classification over time. Mistakes can happen, such as entering the wrong value, using incorrect casing, or omitting spaces, which makes list and column values inconsistent. We want data entry to be uniform and efficient wherever possible. To achieve this, we should use a lookup table to provide a dropdown list when someone wants to enter a new animal. Let's create a lookup table for this purpose.
    
* To create a lookup table, go to the object browser, select the Animal table, click "Create Lookup Table" under the column section's more dropdown, select the column DOM\_BREED and create on lookup table, and a new lookup table named DOM\_BREED\_LOOKUP will be automatically created to store a unique list of values from the selected column. You can also make the change by modifying the displayed script.
    
    *A lookup table serves as a "master list" to find a business key value, like "DOM\_BREED," in exchange for its identifier, such as the id column, for use in another table's foreign key column.*
    
* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742397855444/d8b7717d-22ac-4402-a0f4-fe61c0537d87.png align="center")
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742398153602/f74bcf65-49a0-48ea-871b-a0d559f3221e.png align="center")
    
    The following SQL commands were executed behind the scenes to create the lookup table.
    

```sql
create table "DOM_BREED_LOOKUP" (
    "DOM_BREED_ID"number generated by default on null as identity,
    "DOM_BREED"   varchar2(4000 byte) not null,
    constraint "DOM_BREED_LOOKUP_PK" primary key ("DOM_BREED_ID")
);

insert into "DOM_BREED_LOOKUP" ("DOM_BREED")
select distinct "DOM_BREED"
from "ANIMALS"
where "DOM_BREED" is not null;

alter table "ANIMALS" add "DOM_BREED_ID" number;

update "ANIMALS" x
set "DOM_BREED_ID" = (select "DOM_BREED_ID" from "DOM_BREED_LOOKUP" where "DOM_BREED" = x."DOM_BREED");

alter table "ANIMALS" drop column "DOM_BREED";

alter table "ANIMALS"
add constraint "ANIMALS_DOM_BREED_FK"
foreign key ("DOM_BREED_ID")
references "DOM_BREED_LOOKUP"("DOM_BREED_ID");
```

You can now verify that the new table DOM\_BREED\_LOOKUP has been created, the column DOM\_BREED has been dropped from the ANIMALS table, and a new foreign key column DOM\_BREED\_ID has replaced it with values from the new lookup table's ID.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742398802172/6b0e707a-0eb4-4f33-9a40-a09ea9a01675.png align="center")

However, after creating the lookup table, the application may start to break. To fix this, quickly edit from the dev toolbar, then in the report page designer, go to the report element properties. In the source, select the source and add the `dom_breed_id` column in the SQL query, which was added to the table, and remove any reference to the `dom_breed` column. Alternatively, you can select the source as a table again and choose the Animal table to resolve this error.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742399352346/e10984da-46dd-4783-b2e5-37521e304d72.png align="center")

### **<mark>Display a picture in a form. Edit link between report and form.</mark>**

Add a BLOB animal\_pic column to the Animals table by selecting the Animal table in the object browser and clicking on Add column in the right pane.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742489448149/4382c7ab-4209-4347-a23b-fee1478cb716.png align="center")

But you see adding this column doesn’t change anything in report but in form it is there.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742490602316/cadcdf0d-da95-4616-86b1-0169fbd4bc82.png align="center")

Now let's delete the form that we originally had (Animal Info form page #3).

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742490723095/5be11e1d-f462-465f-b5af-b77b38e5235e.png align="center")

confirm

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742490752040/bd615de4-2e5a-44b8-a505-bb54e83f5095.png align="center")

create a new page again

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742490775196/6b00ae8d-0490-4fe4-ad7a-b1089769e3bd.png align="center")

Deliberately give page#4 to break the functionality as page 4 is not available

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742491026991/5169c843-15c5-4591-b964-46157404f740.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742492338290/5ef51083-4cd8-47b6-98da-1c1fbf1fe6a9.png align="center")

now run application directly as modal dialog can’t be run directly

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742491270003/75225b29-7052-4cf8-9415-538a6b0493ef.png align="center")

Now, if I run the application and try to click on create form or edit any record in the report, I get a page not available error.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742491405300/6fba83ae-d1cb-4cb0-999d-9712307a137b.png align="center")

To fix this, go back to the report page, do a quick edit, and set the target to the correct newly created page #4, and also change the name in set items to P4\_ANIMAL\_ID and click ok and you see application works well but in report when you click create you still get same error as previous page 103 is already deleted.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742493418312/242d7034-f99c-4f3c-a6ef-5e006ecd8d51.png align="center")

Now lets try to upload a image to newly create blob column

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742493821695/20b618c8-f042-48bf-8847-cb93da4f3f00.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742493836641/6d5fbd91-fb7e-4678-b2d4-6ad139fd8b35.png align="center")

After uploading, you can see the image, but to view the blob content, add a page item in page #4 for the Animal Data form, and we won't use the existing ANIMAL\_PIC column to display animal photos since it only allows browsing and uploading.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742494057233/5c984bfc-e66b-47ea-b52d-beb61f58396d.png align="center")

rename new page item to P4\_PIC and select type as Display image

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742494277770/28ed7e82-602e-4384-9456-2e35f065c6a1.png align="center")

Now scroll to source section and select the form for source and select column which you want to display

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742494366105/5ee3e169-b66c-471a-a0d5-cb5afff1d68d.png align="center")

Now when you will edit a form for a row you can see pic you had added already added.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742495031743/c3894388-9fbb-4008-92d3-e39bd53d1ef9.png align="center")

### **<mark>Create static and dynamic LOVs in Shared Components. Use them in a form.</mark>**

Copy the **Animal Data form page (Page #4)** to create a new form page called **Animal Data LOVs (Page #5)**, where users can input data using a dropdown select list or Popup LOV. DOn’t associate this page with navigation entry yet.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742623382759/e60becec-2b31-4afb-ab28-f4fb2f81d5f0.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742623423645/eca70fd5-7408-4fa4-a59a-e54652d6ed67.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742623847934/428b6377-0600-42ce-94b6-6c6aae3b877d.png align="center")

Now are next idea is to create static/dynamic lovs for each column based on the requirement. LOVs help prevent errors in data entry. There are two types of LOVs: Static and Dynamic. Static LOVs do not change over time and only developers can modify them. Dynamic LOVs, on the other hand, come from distinct column values and can change as users update them since these dynamic values are auto-populated. Static values will appear in shared component LOV lists, whereas dynamic values will not.

here is Animal table column for which we will be creating LOVs

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742624084623/cec746d8-0cc7-4fc7-870e-13e88d78b114.png align="center")

To create LOV go to Shared Component → Under Other Components select List of Values → Create →  
Note - You have already DOM\_BREED\_LOOKUP.DOM\_BREED local lov already created as part of lookup table creation from Animals.DOM\_BREED column

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742624381629/78be4bbc-d8a6-409c-a295-01061fff1a2d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742624488243/ce293306-f3e4-4235-9adc-3ddbc57e605b.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742624723668/f4d233a9-f311-4112-b73e-f57b4664b1d7.png align="center")

The Display Value is what you see in the application dropdown, and the Return Value is the corresponding value that will be saved in the database table column. Now lets LOVs for other column as well.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742625013552/073be84a-11ee-4dd2-b2f8-8e961fc704a5.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742625339998/91b126cc-185c-42db-92f1-40de7ea72a54.png align="center")

Now let's create DOMINANT BREED dynamic LOVs like the one automatically created by APEX during the lookup table creation from dom-Breed.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742625526133/53a3559c-5f78-4669-8ea1-8bd647ec75f9.png align="center")

Either make source type as SQL Query or Table like below

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742625827093/e39cae20-a466-4ec8-bc56-7bcae5e4e925.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742625932849/709d452a-0c46-4599-8364-2f660947cc75.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742625952251/d36c7150-ce47-4643-a411-dd9f690ccade.png align="center")

This will create local LOV.

Return to the page designer and change the column items' identification type attributes to either a select list or Popup LOV and change List of Value attribute for same selected column item.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742626264553/5a83eff7-b0a5-409f-98e6-fbd4b493b4a6.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742626343670/5777ada9-38bc-43b9-a51c-c2f643719bdd.png align="center")

Now if we run application we see for the newly created almost all filed is either select list or popup LOV. now lets create a lookup for status field.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742627077019/e17a545c-0538-49bf-8ac6-58c6e52139e6.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742627120539/eb812fd6-08ff-4178-8ac5-6c3d66b36e17.png align="center")

Once done, you may see a "page not available" and "status invalid identifier" error. To fix this, change the source to status\_id instead of status. Then, change the column type to a select list and set the source to the newly created animal status LOV.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742628016323/2b64978d-1014-442e-b85e-415bb197dfdc.png align="center")

Keep in mind that when you run the application and click the edit icon for a row in the list of animals report page, it will open the original form without LOVs. To fix that go to report page designer #2 and change target attribute to page #5 from page #4 to map to newly created form with LOVs .

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742628887895/576b754f-eebe-4270-8478-8b1bba07c45b.png align="center")

Now, run the application and try to edit a row in the report using the newly created form page with LOVs; if you see an error for status invalid identifier, change the source for status to STATUS\_ID for page #5, just as you did for page #4 previously. Now all should be good.

Below are the pages and LOVs we have created so far.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742629150919/00d82806-12c8-4763-8be5-d2831989c6fb.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742629162000/88085a38-0c6a-4ed9-ba61-84e08d08f103.png align="center")

### **<mark>Add data to a static or dynamic LOV, clean the data, and prevent inconsistent entries in the future by enforcing lowercase in a form.</mark>**

To add or modify LOV -

Developer can go to shared component → select LOV → either Add Row or Edit

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742640908357/fd6f1d7e-d32f-4776-bf68-cb0a450e0250.png align="center")

For Dynamic LOV, we can create a form for each lookup table. Users can add to the list by using the form  
Lets create a interactive report and enable form there like this

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742641584001/f078701c-8c63-47ea-abb5-a4d176c146ca.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742641648255/1acb5e59-fd7b-4b91-acb8-95662b1fccf3.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742641657180/b2d60e08-f4fb-4141-8a52-2fc586542f33.png align="center")

From this Status Item Report we will try to insert a new status deceased

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742641748684/a9fee89a-2564-425d-ab78-846bbec2dc63.png align="center")

You can check the new addition from the forms you had created earlier or from List of Animals page

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742641833421/6a881b12-df86-47ad-b50a-a80699decbee.png align="center")

Just as side Note if you want to bring Animal Data form page to Home in navigation menu. then go to shared component →

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742642315632/235f18cb-6a6a-4491-b880-0ae8db1ca70d.png align="center")

Now see Animal Data is not in Home

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742642365334/a97f7040-b29d-439b-a866-caffb73ed864.png align="center")

Chnage parent List entry to Home and Apply Changes

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742642431933/3111360f-2cc6-42df-9eb8-1a68dfdc3f49.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742642491913/a9f9fe8e-18eb-4675-b8fb-aade9d33e842.png align="center")

Returning to the project, you may notice that the color values of Animals are inconsistent, appearing in all lowercase, uppercase, and camel case in different places.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742642710923/634a28bf-e984-437f-ba14-a81e9ad9dd67.png align="center")

Now to ensure data is consistent irrespective of the case it was entered. go to for page (page#5 in our case), right click on column for which you want to make thinks consitent(in our case primary\_colour would be in small case)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742643054086/5bfdc54a-7f49-4217-afcb-8a725baae6b3.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742643132388/194e07c5-535b-425c-a6ab-75d733daf09d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742643254207/0503076d-f660-40bb-aacf-19c47297090d.png align="center")

Returning to the project, you might see that the color values of Animals are inconsistent, showing up in lowercase, uppercase, and camel case in various places.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742643504059/a06c0ec0-4a92-458c-943a-96905d12a103.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742643520142/6c95ac5b-d029-470e-856f-f17302edf5f4.png align="center")

### **<mark>Correct a target page. Change the layout of page items in a form</mark>**

If you see a "Page isn’t available" error when clicking the create button on the interactive grid list of animals, go to the page designer, click on the CREATE button in the rendering section, and change the target properties on the right to page #4 as shown below; this will solve the page not available problem.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742622389466/b02ad520-d9c7-4544-83a9-8aded401cd3a.png align="center")

To Create a form lookup table for Dominant Breed - Lets create a interactive report for this

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742644330751/050cd2fa-ab25-48db-8e70-e248604aa07f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742644468080/dcb48188-9a76-4257-8c7c-632b3c3b6b00.png align="center")

(Change column Dom Breed ID from hidden to plain text or display if not appear default in form)  
Now lets go and add “American Blue Heeler “

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742644655353/8a6b0d12-79ee-4d24-af73-badc5e349346.png align="center")

We know APEX is a responsive design tool, so pages in the application will adjust their display based on the device being used. Now, go back to the List of Animals Report and change the layout of the form. Instead of having a wide column field for each column, change the layout to a two-column page so that two fields will appear in a single row, except for the last two audit columns.

Before Layout change

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742645274254/f7ee0c34-cc9a-4f47-ab49-dc93179faa94.png align="center")

Now to change layout select column in page designer (page #5) → go to layout section

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742645498450/0a77ff40-ca69-4aab-8322-90d5f6cf06c8.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742645628888/d0170ce0-7914-4c78-b49b-75e18b323485.png align="center")

Let Start new Row enable for P5\_ANIMAL\_ID. and observe how layout chnage when you make start new row to NO for P5\_CATEGORY.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742645842489/917fee1f-4845-49fe-b669-8b82245c65b7.png align="center")

You can also see the column span set to Automatic below the enabled New column in Layout. To explain what column span is, APEX views any display screen in 12 units, so if you want to change the width of some fields relative to others, you can adjust this column span value. For example, if you set it to 6, then both columns in a single row will have equal width in a form, and if you set one to 8 and the other to 4, the one set to 8 will be larger, and the one set to 4 will be smaller.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742645879078/94610077-90be-42da-9396-eee74efb19cd.png align="center")

Now if i set Animal Id column span as 4 in form it willl apear something like this

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742646233076/0f777e10-6f7a-4b62-953a-0e20e1e7fe7c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742646246494/c68a6fc0-9908-4a29-bd11-c34dfae0c415.png align="center")

Let's disable "start a new row" for every alternate item so 2 fields appear in a single row in the UI form, and ensure audit columns appear last by assigning them a sequence value greater than the last column, in this case, P5\_PIC.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742646646719/934746b5-36b5-42f1-8078-7d627489b3fb.png align="center")

To display 2 fields in a single row when 3 or 4 fields appear, set the column span value to 6, resulting in the final layout after the change.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742646827373/76395389-c889-4346-9ec3-ce94a0cc3411.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742646869552/6445b020-fdb9-450b-ac52-ed5b8a44e685.png align="center")

### **<mark>Change navigation menu. Add a hierarchy. Create 2nd application. Copy a page</mark>**

Reorganize and group navigation items. Before this create 3 more landing pages (like page #1), all will be blank pages.

Lets create Animal Page #10 and keepp that at the same level of Home(No parent selected in Parent navigation menu entry)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742649629530/bdbbf564-1a56-4fac-8fcb-073cfdb7ba4c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742649643622/f77e25cd-2ef4-4bbd-8c87-f21e2794e240.png align="center")

Now similarly Create 2 more blank pages People and Data Maintenance. and the purpose of these blank pages to provide that top level groupings where other navigation items can be put together like in Home.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742649823892/623cf8d3-9a9f-4f6f-84c0-4f1e5ae7994a.png align="center")

Now in Animal Page we’ll create new component and/or region

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742650123293/f54d37a5-04b7-42cd-950e-0bd64f6ff4d4.png align="center")

Change Name to Animals and add details to Source

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742650416490/ab9d3871-f660-40d4-b267-fa89f405aa2a.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742650449294/4cce1afa-e313-45fc-a6fa-67900782ab21.png align="center")

Now add 4 new pics to shared components → Files → Static Workspace Files (As we might need to add those files in some other applications in single workspace as well)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742653297051/3403e21f-bc3c-4115-bfa3-15ccae248a07.png align="center")

Copy animal page reference and paste in source section along with existing text as HTML

```xml
<img src="#WORKSPACE_FILES#animal_page.jpg">
<p>
<h3>Reports and Forms for Animal Data (Transactions, activities and Animal Records) are listed here.</h3>
</p>
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742652648055/79ce65c1-a6dc-4960-b017-fae5f785abe4.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742652659959/55710dd2-bc98-4ccc-9a8e-5ab7daf4090d.png align="center")

do same for people and Data Maintenance page

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742653701906/53edd7f0-4070-428f-96d2-f7e42378a7ca.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742653711978/ac107b5f-7482-4ef4-b1f1-b18eba73302b.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742653430163/b45dd11a-031b-4a39-9c31-951a72e362bc.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742653465247/71cea330-2241-4b0a-9c8d-4df5e3425ffd.png align="center")

Once done with these goto shared components → navigation and Search → navigation menu → click on the name Navigation Menu.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742653868084/88145d7e-3d52-44e5-8d41-e75773dcc490.png align="center")

here notice column parent entry the entry for which parent entry are Home they are listed under Homem menu. We’ll now move status item report and dominant breed report under data maintenance by assigning Data Maintenance as parent

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742654109922/586f78d4-7bf3-436c-8ccb-0562e25dc3d2.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742654182183/2d5b7b64-0623-47b0-95f5-4627bffe2427.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742654236201/2f891094-b1fc-44ca-921b-2cf00bac1431.png align="center")

Now switch List Of Animalsand Animal Data to Animals Menu

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742654369320/a980266c-1af9-48a4-a1fa-c9374787d6e6.png align="center")

Animal Data id old form which we created to enter animals’ data w/o any select list or popup LOV.  
Now lets create other application .

Click on Home icon on designer de tool bar and create Application from app builder

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742654625322/41c09394-3f6b-4f36-a599-fdb0a9acde51.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742654700524/4f31ee9e-93b0-4a91-9f66-3ed40d950aa1.png align="center")

No copy Animal Shelter pic reference you had uploaded to workspace files and go to application (App 102) → shared component → Application definition under Application Logic → under user interface and paste image reference in logo URL

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742655054141/9c1de350-a5fc-47bd-b704-f0b9323e6f8c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742655088185/32e519cc-19b3-4505-b384-97cdc3af7687.png align="center")

Now lets copy few pages from other application to this new one.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742655213621/61faf9c0-304c-473d-8b29-14e5c169eb5e.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742655235745/e8a332ae-3dcf-480f-a52a-35b1fb2683ed.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742655325333/654e3dde-a33b-40e7-9040-274625557e09.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742655468336/38fc39a9-fe46-4dc1-b04a-a5f87610ba8d.png align="center")

Now the first thing we’lll copy are all 3 parent pages for navigation menu we created newly )Animals, People and Data Maintenance).

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742655738547/51c5dbde-c94a-43f3-85af-9bb1ff0d05a7.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742655747207/4f9f5519-eac8-48b8-b4ed-73dd590cf29f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742655811243/0d5ac365-92ab-4269-824d-c79d35ff7e6a.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742655824808/00382078-649e-4316-ae27-3b78e6f0c47a.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742655859081/251f7459-bae3-414f-a85d-341b2ac272a9.png align="center")

Similarly copy the remaining 2 pages People and Data Maintenance (ensure page numers are same)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742656625518/e4869f5f-d04d-4e73-b20b-1dde880be781.png align="center")

Observe I have copied as **Data Entry Support** Not **Data Maintenance** just to show they don’t have to same when copy. If you have already copied, you can rename it from shared component navigation menu.

Now lets copy in status report and form to Data Data Entry Support

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742657033909/37498b6a-bfeb-4fb4-9a41-136b83c2146f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742657083729/fc4fc4be-7879-4660-95f8-6aefa8243f53.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742657143790/12daff12-2e5f-4369-bf97-5750b601775e.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742657150495/abfd64c9-b68e-4142-962d-5477d5f9d262.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742657241865/5f079593-ea12-4a74-9e36-2875a3387d57.png align="center")

But if you click on edit icon here you get page not available error message. To fix that we to copy the corresponding for as well. also ensure page numbers are same else you have to fix the target properties.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742657299745/acabf8b0-cbf5-4758-986d-d3ae2d21c7cc.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742657445045/38ccba28-07e4-4644-8b54-aaf8ffaf3e97.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742657501872/6b2b6876-e53a-466a-a837-871bfb16baa8.png align="center")

click next next Finish

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742657546073/3da67deb-07a6-43db-85a8-d9e964f1904f.png align="center")

Now we can see form opening on clicking edit icon in Page #7

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742657609737/d542b81c-7226-4939-9244-666f66d64156.png align="center")

Now Lets do the same thing for Dominant Breed Report and put under Data Entry Support

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742657730767/5816035d-57db-44b9-8e35-1c839418b425.png align="center")

Now copy corresponding form also to avoid page not available error. don’t create navigation entry for this form page you are copying for dominant breed.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742657853296/9cf0b302-79d6-47c5-8820-971ba0eef227.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742657916529/fd973440-4737-4b37-acf7-91368f59e4d2.png align="center")

Now Lets move the navigation pane from the side to the top. Go to shared componenets → User Interface Attributes → Either Under Show All or from direct Navigation Menu tab change Position to Top from Side.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742658188415/4b121c49-b6cb-47c5-ba35-761dbe7c3e56.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742658312663/ed85ab01-eef4-48c3-a02b-b7927eed182b.png align="center")

Observe images are also coming fine as they were uploaded at workspace levell not application level.

***Note We could use one application for development/ testing and move pages to the second application once they have been approved.***

### **<mark>SQL code concatenates columns in a dynamic LOV. APEX writes LOV SQL code</mark>**

Before continuing, let's review our progress so far. We’ll treat **Daily Operations** as our **DEV** environment and **AS Operations** as our **PROD** environment

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742658850090/debcebd6-24b1-4bd3-9144-ba3ff0d7a900.png align="center")

So far, we have created lookup tables only for the Animals tables; let's create more lookup tables for the remaining ones using the object browser and add unique constraints where needed.

For Activities, we need to create two dynamic LOVs: one for categories and another for sub-categories. For transactions, we need to create dynamic LOVs for transaction type, Client ID, Pers ID, and Animal ID. Except for transaction type, we don't need any lookup tables for the remaining three attributes as they are derived from existing tables. For the persons table, we need a dynamic LOV for ZIP code, which doesn't require a lookup table as it is already referenced in the ZIP table. For the Employees table, we need two static LOVs for STATUS and ROLE, and one dynamic LOV for Supervisor ID. No new lookup table is required for the Employees table lookup tables.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742699350571/f41c87a5-b5cb-4886-b184-31df38940ac8.png align="center")

For Veterinarian return value should be VET not VOL (typo)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742699512720/e849ee25-a8f5-4645-bae7-9e4cce167cfa.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742699536300/7d7ca29e-2bf0-472a-a66d-53fdca886611.png align="center")

After creating the sub-category lookup table, we'll add one column for the category to it, as we'll use this later to create a hierarchy of choices in an LOV.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742699805574/d0637897-27f2-491b-82a3-5f5f88795e64.png align="center")

We have 2 category present in our DB

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742699947637/f6e4c543-b07e-4096-81a6-692a75550374.png align="center")

So let's manually map each subcategory to these 2 categories.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742700015283/6aed5135-78fd-4cd6-86a4-e7f7650698fc.png align="center")

Now update manually the correpending categorory

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742701089373/fa60edb3-e361-4fb6-81d5-813a4fa383d3.png align="center")

Let's delete the row for vaccinations because we already have a similar subcategory called vaccination.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742701117672/cb5bcd06-470e-4219-97d9-bbb56d0893a1.png align="center")

Update subcategory id to 3 where it was 1

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742701678126/ed6eeff4-f96b-42a0-9e98-604d2718ba86.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742701850604/22a7b216-e054-45f2-8650-0bce7144fda1.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742701855867/cc1504ac-d3ff-4222-9791-25e13ab11664.png align="center")

Now add 1 unique constraint to Subcategory field to avoid duplicate entry

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742702413080/1a635075-2dab-4cdb-ac42-684f910421e4.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742702448479/68f09197-a6ae-4c5a-8055-7e3350b0d658.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742702567135/877eceb4-fc9b-408a-9dec-a8579dd16059.png align="center")

Now similarly create unique constraint to remaining lookup tables created

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742702713941/f6d5a9b1-b177-438d-a0ab-f24b0615dcb6.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742702757320/167d8c48-45e4-4a9f-94df-5cd8637f76ee.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742702800968/9aa85638-2e0a-4ed1-b8af-51ccd8a4a6f5.png align="center")

Let's go to the Daily Operations application to create some LOVs from shared components, and copy-paste these codes wherever needed to create dynamic LOVs.

```sql
--category_list
instead of SQL query select source as CATEGORY_LOOKUP -> display:CATEGORY and -> RETURN: CATEGORY_ID

--subcategory_list
instead of SQL query select source as SUBCATEGORY_LOOKUP -> display:SUBCATEGORY and -> RETURN: SUBCATEGORY_ID

--client_list
select lname || ', ' || fname || ': ' || pers_ID as display, 
   pers_id as return from persons order by 1;  
   
--emp_list
select lname || ', ' || fname || ': ' || persons.pers_ID as display, 
   persons.pers_id as return from persons inner join employees
  on persons.pers_id = employees.pers_id order by 1;  

--zip_list
select zip || ', ' || city || ', ' || state as display,    zip_id as return
from zips order by 1;  

--animal_list
select name || ', ' || dom_breed || ': ' || animal_id as display,
  animal_id as return from animals inner join dom_breed_lookup
  on animals.dom_breed_id = dom_breed_lookup.dom_breed_id
order by name;
```

Below are the LOVs that we have created so far which we will use in future activities

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742704591289/278dc3b5-cf67-4d0e-b7dc-cb3cefa1346e.png align="center")

### **<mark>Put navigation buttons at the top &amp; bottom of a report. Change an LOV to radio group.</mark>**

Let's modify the report and form for ANIMALS by adding the record navigation feature to the top of the page, so we don't have to scroll down to access additional records.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742717579356/9404923d-46a8-4cfd-9bb2-84a5f6db05b5.png align="center")

If you don't see navigation arrows, you can enable them by going to actions → Format → Rows per page → 50.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742719046564/765a0949-d5d7-452b-9937-e060ebc373b2.png align="center")

if you don’t see Rows per page option under Format then you can go to page designer and chnage Pagination type attribute to Page and enable Show total count to see total no records in the report

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742719168802/b5a193cf-10ed-4714-986d-33d9df3ec435.png align="center")

Now to get this navigation in the top of page along with bottom you can do like this in APEX version older than 20. but for 20+ version I don’t see this option. still searching :)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742720125408/5cc0d6d6-ef13-48c7-861c-781130b7b3c0.png align="center")

Modify the display of few LOVs to radio group from select list. Go to Page #5 form LOVs designer → change type to Radio Group.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742720491835/f8eb95b1-bec7-408b-a6ae-149df871d0cd.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742720504200/afe08bec-debb-470b-a404-df45b61a943a.png align="center")

Change the Number of Columns under settings to 3 to prevent options from appearing vertically, and disable Display Null Value to avoid showing null values as radio button.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742720653142/731e48eb-b739-4de0-a923-0fab0aa8e484.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742720667127/e3f87886-b6a5-45b8-aa67-2bfcbb95b669.png align="center")

Note : To select multiple values. insted of radio group you can choose check list or shuttle.

Now Similary you cange Housetrained from select list to radio grup.You can chnage for status and SP\_NE by holding ctrl button and change type to radio group. they both share common lov properties.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742721089018/ba85b2db-08aa-4e91-9329-2403336855d6.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742721113520/f3688073-b454-440d-969f-045235650a29.png align="center")

Now lets copy List of Animals report (Page #2) and corresponding form with LOVs(page #5) to PROD (AS Operations). Click on any page then copy page#2 and #5 from DEV Daily Operations.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742721366923/60de8906-8d8c-47a8-88f5-cb55e4ba0bb4.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742721404348/067edef1-655a-4a94-a95c-e750799743dd.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742721492402/580a7fdd-7da3-4ed5-a233-822abbf6a52e.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742721560998/15748d6a-cfad-45fb-ab54-3fffc1cb55be.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742721583182/c125a0cb-dab8-496f-b8e8-4c7214a6cd1b.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742721591966/75b4dd27-768b-4550-8008-ec5e65ec2937.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742721641932/405a2c92-94d2-4b42-bb6d-4204167d9909.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742721651122/1483fee3-99e0-4376-9adf-e7d921951a8a.png align="center")

But if you click on edit option of any record you will get page not available error. To fix that we need to copy the form page as well from DEV application.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742721795522/8a55b162-1f8f-426d-97a4-b081f7a8ae5e.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742721919502/4b33373f-1e4c-432c-b42e-1e664ce13ca6.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742721930834/a81c71c0-e0e6-4fc3-9c66-1667dc944a8e.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742721951496/e7e98110-61ec-4c80-901d-05ceb8ec7f87.png align="center")

Copy all LOVs for this page to PROD. select Copy drop down.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742722098368/0cb8862c-ef8f-4008-a096-8cff8d8a7dc9.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742722126782/6b0609a2-007f-479b-91bd-c86892f30366.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742722134222/47d45571-4fb5-4bfb-a90a-72eedf5ef15d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742722174408/e812ea75-dfe4-474c-bc3a-d58a3fc82440.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742722214011/a297b5be-518e-4c18-9f5d-97af476742b1.png align="center")

You can verify the copied LOVs as well.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742722254770/960fb6ea-73f1-43de-af33-e83b9edfacab.png align="center")

After copying the report and form from DEV (Daily Operations) to PROD (AS Operations), all LOVs, which didn't exist in the PROD app before, are copied along with the form and report pages.

\[Before Copy of Report and Form page from daily Operations to AS Operations\]

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742717311188/c564f60b-4de0-4e49-8641-f8d40268096b.png align="center")

Log in as an end user to see how the application looks, because if you try to log in as a developer or admin, you won't be able to access the page and will see a message instead saying only allowed to change password, so make sure to use the correct URL. [http://localhost:8080/ords/r/animal\_shelter/as-operations/](http://localhost:8080/ords/r/animal_shelter/as-operations/). In older versions you had to copy url till page number like this.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742722928989/a9f42e87-1c8b-44c0-95fb-b9a5425f27ea.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742722665933/0cb81aae-5e43-4584-a5cd-f826b48634b7.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742722770241/34cb82c3-707e-4874-a767-d476c282360a.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742722802259/236e7ab8-afce-4870-b589-f92d530d8306.png align="center")

As a normal end user, you won't see the dev designer toolbar.

**<mark>Create a master-detail form (2 tables) and simple form (1 table)</mark>**

Before starting on master details, create a model excluding lookup tables, as they are only meant for data entry consistency and will clutter the model, making it less succinct. For reference during model import, in SQL Developer's data dictionary, you can check and drop lookup tables, then click on merge and rearrange tables so they look better in the data model.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742827265759/2f29b3c6-e734-4399-950d-d596b629d48e.png align="center")

Normally, a single table has a simple form, but there can be situations where two tables are linked, with one as the master and the other as the detail, or main and subform. Let's look at the data model to discuss when to create a simple form and when to create a master-detail or main-subform. This decision depends on whether the tables are dependent or independent. Sometimes, data in one table depends on another table, like in a strong entity 1-1 relation where a foreign key is usually a unique key constraint. We’ll create a simple form for "PERSON" and a master-detail form for "PERSON\_EMPLOYEES." Tables like "Animals" and "Persons" are candidates for simple forms as they are independent and not linked to transactions or activities. Remember, you are not limited to one form per table; you might create two or more forms for a table. For dependent tables (weak entities), consider using a master-detail form, such as for "Animal-Transactions" and "Animal-Activities."

Login to Animal Shelter workspace AS\_DEVELOPER → Daily Operation App(DEV APP)  
Lets create a simple interactive report form on persons.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742828126534/bba897c1-7406-4f56-8936-745f9138c9fc.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742828248400/ef045645-e60d-45cf-bf07-f717d7d9cdb1.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742828462924/54a950fa-32ed-4bf2-93bc-b8b887b8e08e.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742828483073/f4720ee7-fc22-4ed2-be6f-5ed005201e54.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742828562662/f92fa83d-04ec-4ddf-bdb2-f2eac4741f12.png align="center")

Click on any edit icon you’ll see form Person Data

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742828594358/aaec2261-36cc-4a19-b4e2-2e6b650bb9a5.png align="center")

Modify the form to adjust multiple fields in 1 row. For audit keys Data created and modified make the type to Display only as they’ll be populated through triggers.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742829082317/7a110b13-98e7-42b1-b250-02d8f651d7e4.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742829098062/d04355e7-3d06-44e4-80d6-415678ffa0f1.png align="center")

For ZIP use POPUP LOV

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742829312155/c31c9527-560b-4922-b443-c9f438329846.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742829329939/e000eb0e-ea14-4e53-84b3-09013e9b6dcb.png align="center")

Now, Person Data is a simple form, a single page that interacts with one table for adding and maintaining data; let's look at the master-detail form.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742829544590/6fe0edc9-1fc0-4fa4-94b3-1d6b021b0887.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742829606826/c870dadc-2d12-4153-8732-72c68fdd8dc6.png align="center")

you will get 3 types of master detail style (Stacked, Side by Side and Drill Down). We’ll not be using Stacked that is we can do , but here we’ll see and create Side by side and Drill Down example

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742829574213/45594928-f439-4f07-91a9-062a4de6d88d.png align="center")

Lets create side by side master detail page. Create anavigation mentry for that as we’re going to do this more than once.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742830268746/a052bcbf-5d68-43d6-b264-a5be57b24e82.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742830507336/d82ec47d-b0d6-4621-bace-ce4c870e207a.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742830869399/0f36bccf-b7f8-443b-a561-f9bc208f637e.png align="center")

Run to see if a person is employee and if not a employee.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742831045869/bf3248ff-6c4f-46b1-89e1-18cf1f81a787.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742831082733/524c2897-40f8-4a18-8ba8-7612d948537a.png align="center")

Lets modify the master-detail page to have the ability to serch by id along with name. for example if you wil search 90117 or 90151 you’ll not see any record.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742831502036/f0cbd052-50b2-44c6-8938-832bb523cb1b.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742831560489/4a998243-ba19-43ea-92a4-8d9e9f226e58.png align="center")

Lets modify the page to incorporate this modification sech by id. From page select Master record and modify SQL Query under source.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742831838312/cb22884b-982c-43ac-8847-f22eeaaf8c10.png align="center")

post change

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742831988525/9fb0887d-a892-4d8b-b78c-6fb035a37ee9.png align="center")

You can see 3 pages created beacuse of 1 master details page. we created page#15 but page #25 and #26 created automatically 1 for master and other for detail. Here the report page is of type classic report.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742834627567/2f5a2a1f-c84d-4a00-b525-b7ed893e7a89.png align="center")

Now create 1 more master detail form type drill down. lets number it 16.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742832106503/d1069401-21cf-4b4e-960e-8968ce5ab2ec.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742832351451/dc0161e1-7687-4226-a47b-8967d0a54fca.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742832457187/cd032f85-af3e-486d-b095-1b4fa18b5daa.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742832764715/898fdbc8-5264-47f7-8ebc-bb177087056b.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742832781066/1e7d8491-278b-4059-a860-8d595bc4751c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742835062550/f03d9ef1-2006-48ef-bf5c-c533e4ee328c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742835158171/a0a32021-0c32-4c92-881a-dc1580ae5439.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742835165111/fae8b5e0-9a5d-403a-a88a-eded472f7fa1.png align="center")

Lets make ID columns visible in the master-detail as well.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742833133776/add91baa-c36b-41d6-a26b-52dc388b91ce.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742833414304/fd4cd905-16b3-4905-8912-b7297db318b0.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742833429966/1602c23f-1ca7-411f-a79f-1f00f15a08ae.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742833188818/01100817-30fa-4859-ba82-e4485de70052.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742833210239/b5badb26-83ce-4303-a6af-1fcaa97471ae.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742833524802/d8f42eb2-1b70-4937-9745-348b81720c96.png align="center")

For the drill-down report page, which is an interactive report, we don't need to add search by ID like we did for the side-by-side master-detail type, where the report page was a classic report requiring the search by ID feature.

### **<mark>Add column to table &amp; page item to form. Edit SQL to filter rows shown in a form.</mark>**

Pages created so far for Daily Operations (DEV APP) include the drill-down type page #16 IR and page #17 form.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742836307881/25ffb2be-def1-4d04-9b95-b05343bbbc91.png align="center")

Now let's add and update the column in APEX object browser, then include it as a page item in the APEX form. For that from the previous master-details page we created, if we don't want to show information about people who have left or passed away, we don't delete them from the database; instead, we flag those records as inactive. Let's add a status column in the Persons table where the values can be Active(A) or Inactive(I), similar to the status column in the Employees table.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742906431020/f0ae1363-38d5-4ae0-b38d-fde404b0e9b6.png align="center")

update all perosns to Active (A). Lets now update PERS\_ID 90001 PERS\_STATUS to Inactive(I)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742906577450/53796c46-fbb0-498d-954c-e67fbe4818c9.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742906972926/45ab8444-fb56-4cde-8fde-8eead45c39b1.png align="center")

Now idea is to show 120 records in form not the 1 which status we made Inactive(I). so edit the sql from page designer and add require filter condition

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742907273237/d4c23970-0948-401e-9dab-510ee230966f.png align="center")

verify from UI

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742907353979/f6c05347-286d-428d-806a-af11c489036e.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742907378027/97b2ba61-5b56-4e1b-aa5a-fd9b5e3eeede.png align="center")

Now lets come back to People → Report List of Persons. In the form you don’t get field/label to chnage newly added column. so to add that to the form create a page item for pers\_status.

Before change

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742907637766/521a15b0-b5f7-49d5-ba10-8bfd29b36f21.png align="center")

After change

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742907724491/437e85ac-cfd6-4d1e-9af1-372fd5d0684f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742907886742/8d12933f-7d63-4649-a88d-4a6c5b74d979.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742908009119/cead6eb4-90cd-45a5-a85c-59940ebadf4b.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742908039366/d9a42b61-e414-4c66-a5f2-6ac9df6cae63.png align="center")

Now lets have a LOV for Pers Status. Create

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742908338591/311cbead-89f6-43f0-8492-d037e2f5f01b.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742908514134/aaf9cc86-55d9-47ae-a54a-52efa54a764f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742908588657/b89a27d1-8e50-46e2-a647-af914a6c8c30.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742908717554/3a474a30-3b25-4a3f-98ff-ce4594fbbcb0.png align="center")

Now Select the drill-down report under home and change pagination attributes in the page designer to display page navigation above the report page too.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742909018960/126c4111-7ada-4b3a-a82b-e72d4725ff03.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742909052341/1386b3ee-cb02-4662-92ed-f14fd58b98c5.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742909282928/884eb486-74f2-4816-9912-8545b257cd63.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742909296675/d2e7f8c6-92f3-4412-9b98-fb04a1738ed2.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742909316420/c530a4fa-8824-42a9-ab35-b9d1924e8852.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742909352484/920e5576-e37f-44ce-9a4e-9e8232d811b9.png align="center")

Now lets display 15 rows per page.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742909508114/f02d8549-a08b-421f-8ef7-d4b40e8aeb49.png align="center")

Now edit the form page desiner to display 3 fields in 1 line

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742909721833/d35266b0-c51c-4203-9344-bb02fcceac54.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742909774307/a70740be-9afa-4f2e-a501-230fdc71043b.png align="center")

Finally we can edit the details directly in the report as it is a interactive grid, unlike a classic report in a side-by-side master-details page.

### **<mark>Correct code for an LOV. Add LOVs to master-detail. Add data to form.</mark>**

Back to Animal Shelter data model we see zip table has PK on ZIP column rather ZIP\_ID like all other tables inthe schema. Now we will chnage zip\_id to zipp in zip\_list lov

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742985988466/7cb3d395-a752-4403-9c85-444819a9f4f1.png align="center")

Now from application of you see zip is souced from zip\_id. so lets chnage that to zip\_list lov.  
Before

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742986146711/e818cce5-199f-4d61-b9ef-e712a600c8f7.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742986187340/521ccb36-077d-4c68-ac71-56809512e906.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742986216443/8ac3d556-1871-403a-94f9-77a91e5f18e3.png align="center")

Now lets display/add Pers\_Status column to the master form.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742986425218/52f5818c-fb0f-4bbd-9da5-9464e22e530d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742986493884/15735fec-36eb-47a9-9531-931328237621.png align="center")

Chnage source and sequence so that it appear next to phone no

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742986599917/5767db07-cc07-4a3c-a244-691ad98f4298.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742986616343/614ceb44-36fa-4f22-8392-7fba1d417c32.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742986712445/040d95fd-661a-4cb9-99e0-b44d9d23e22e.png align="center")

Lets hide those audit columns as they are auto populated through triggers.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742986788542/6972f977-01e8-4445-a245-c5ab55da1e9a.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742986913899/97198b5c-6517-4231-bf4e-c281126183c1.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742991065364/af9eebb1-4847-44da-a82a-f0245a3f0dd5.png align="center")

To see single row view

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742991181320/eda073e1-ef16-49dc-b196-b3d063aa9e95.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742991185635/53197ccd-c5ad-418d-8a8c-6979635daa7f.png align="center")

you can click on edit and edit the fields inline

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742991233835/73ee8d92-4090-4b8d-b486-55fdbacb3e3d.png align="center")

Now lets hide audit columns here and add lovs for status, role and supv id

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742991422826/1afe44d6-be82-46ff-aaca-1357e280ed35.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742991557707/40edf9f9-6495-4147-8938-e267ababe2a8.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742991594375/a108cd35-7ae2-4bf3-ab15-2a1d9f520ff8.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742991638899/a7d11875-f873-4421-82bb-724ec2087996.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742991746596/05cea3a5-7f29-467b-9615-4ba6a87bb324.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742991754246/676cbbd0-6c4c-43b7-b03e-4e32aaf942c7.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742991760674/aee46214-6501-47a1-bec1-2a8ae945ead2.png align="center")

You can disbale null value in page designer under column → List of Values to hide null values for selected list. now chnage to single row view and verify if good to edit

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742992029299/1848a962-3085-4cfc-a41c-335c62efcb4f.png align="center")

But here the issue is that the supervisor list includes all Veterinarians and Volunteers and also possibly inactive, so we need to automatically exclude them from the select list. For that we need to update the LOV for this.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742992545600/de645de7-a66d-4154-bca7-caf8232381e1.png align="center")

here this extra filter willl only include active one but don’t exclude vol and vets. so as a best practice no need to edit existing emp\_list lov and copy emp\_list LOV to create a new SUPV\_LIST and edit to add extra filter condition.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742992871962/3d983a7e-0dab-4266-b145-70afc791640c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742993106848/9c1c4da2-c028-4dc9-a163-822779bcb629.png align="center")

Now change SUPV\_ID LOV value to SUPV\_LIST from EMP\_LIST

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742993227377/a54b8441-7635-4016-aa5d-d4c8a4563d5c.png align="center")

now you will only see active supervisors

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742993369685/148c7ef8-161b-4164-a2e3-2bd12b5f3dd0.png align="center")

Now lets create data(person).

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742993438577/c5d4ddfe-3dfb-4578-9ac6-fa114b203790.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742993633803/5c510625-cf95-4987-b0bd-e35af453e6c6.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742993638659/fdbaf6c1-1873-473e-a05e-7bf26891aab1.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742993686330/a5277c0e-0106-4959-9774-c5a3f5ed02a9.png align="center")

Now lets add a row for Felipe in Employees table

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742993746765/52653134-2005-4571-a879-4e5eb257090a.png align="center")

click on Add Row

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742993829427/77e8ef1a-5b6b-42b0-8f66-1b503e7a2c8a.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742993843248/e19ea86f-2906-4034-9bc2-ba13064c48de.png align="center")

Hide Emp ID

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742993961841/40523e14-3f99-4769-aa49-2ca272a4dadc.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742994002633/fe3eda3e-6a4a-4662-9e98-0cc2ccc060bf.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1742994145146/e2e7b768-ccec-4910-8bb7-d83aa05e1aa1.png align="center")

### **<mark>Use UPDATE to clean data. Add a unary relationship to a table. Remove a column.</mark>**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743000187376/f637bf8f-62e5-414f-ad6c-48b93f87c055.png align="center")

Lets add couple of Animals to List of Animals

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743001813658/b716aa53-ecbb-409e-8215-f9474a2286d8.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743001976576/084fe950-fd8d-4c0d-907d-523a83be4526.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743002272444/a6085df3-217b-449c-807c-44913057f143.png align="center")

Lets update all Dog to Canine. `update animals set category = ‘Canine’ where category = ‘Dog‘; —52 rows updated`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743002691036/c329fff9-34d9-4208-bf7d-43ce33cef059.png align="center")

Now lets create fk(SUPV\_ID\_EMP\_CONS\_FK) on supv\_id to reference emp\_id in same employees table

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743002989339/41a8fb1b-e50b-4ea3-a6cd-1d67f3c34579.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743003009705/4c4a562d-5884-4f38-90b6-bfb1ba3cf64d.png align="center")

Just for sake of this constraint creation sucessful we can delete supv\_id of the person we created Felipe.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743003325602/140be9d7-9b68-4d93-b47a-2f6fd6ebc1a9.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743003354025/b2e425b7-e3f5-491c-88c4-7ce182db3b20.png align="center")

Now go to SUPV\_LIST and modify query to get return value, so that going forards correct value get stored on selecting values from select list LOVs.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743005471341/b92b865b-d6f8-46fb-b78e-d1663acc3fa8.png align="center")

Now let's drop the ZIP\_ID column from the ZIP table since we already have a meaningful unique ZIP column.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743003822673/212cdc0d-0309-4c06-97f5-32aba8a55208.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743003868317/5f0063b3-afa3-4be9-bfcf-e5a063b8fa2e.png align="center")

Finally, after completing all these steps, reimport the data model to see the removal of the zip\_id column and the new hierarchical/unary relationship.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743004541960/ab7a760f-a0f4-4637-97a0-902e525777fd.png align="center")

### **<mark>Create interactive report and GRID. Format phone display with LOV.</mark>**

Copy ZIP\_LIST lov to create a new city\_state\_zip\_list

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743005627389/e364beb2-56f2-4b2e-a6f3-b54b6d85fb35.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743005760320/0dd2753d-8c6b-4b7d-8cb8-f5aa58db9391.png align="center")

Pages till now

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743005835021/08aa3dae-5c13-4be8-86db-4b7724b1a61b.png align="center")

Now lets create a interactive report page

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743005855003/62ecff9d-b9d4-4179-bfb1-a89bdaeb98fb.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743006455848/5a5e0241-a5d9-4e1a-bf5e-63a5749b79c0.png align="center")

```sql
SELECT PERSONS.PERS_ID,
       PERSONS.FNAME,
       PERSONS.MNAME,
       PERSONS.LNAME,
       PERSONS.ADDR,
       PERSONS.ZIP,
       PERSONS.PHONE_NUM,
       EMPLOYEES.STATUS,
       EMPLOYEES.ROLE,
       EMPLOYEES.SUPV_ID,
       EMPLOYEES.BEGIN_DATE,
       EMPLOYEES.END_DATE,
       PERSONS.DATE_CREATED,
       PERSONS.DATE_MODIFIED
  FROM PERSONS INNER JOIN EMPLOYEES ON (PERSONS.PERS_ID = EMPLOYEES.PERS_ID)
 WHERE EMPLOYEES.STATUS = 'Active'
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743006497992/9c65c601-d4b9-4152-8276-e825c3811871.png align="center")

Now let's display the city\_state\_zip LOV instead of only the zip on the newly created UI interactive report.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743006644946/3d18885a-92bf-41f3-b2cb-99e00b438cc1.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743006654996/8fec4eba-0c35-4778-ab4e-ff4d8ab5a15f.png align="center")

Now we’ll display a formatted phone number. for that we will create a dynamic LOV from scratch.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743006780768/f3313a9a-8187-4a3e-ac5c-063158d495d3.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743007467697/90f26d57-700d-4204-94c3-7397152ba2c1.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743007499204/b642e079-1c5c-4b01-8fa4-caf3ce1d9942.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743007544523/c1edd56a-374a-4cc3-aa80-92a6fa0c7fbc.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743007564036/5af47715-7dbd-42eb-912e-7f534f1c440c.png align="center")

We can filter in IR also. We see 2 emp and 2 vol

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743007662600/545b4166-8342-4eb9-8814-376e95c43ea6.png align="center")

We can download this report with the formatting intact and only the selected records displayed.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743007698601/0affd669-6a81-4b6e-9ad2-fac7a30ea96d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743007749832/70af1ad3-5f3e-4bcf-bfd5-84dc84bf85f2.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743007762400/eea7590d-06c5-4fc3-a4d4-e1ddd69ec62f.png align="center")

In the downloaded report, the ZIP and PHONE\_NUM are formatted even if the database values are not, making the download feature very sophisticated and useful.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743007927739/4ad3b2ac-06d7-439e-9a1f-23eb89221ac0.png align="center")

Now let's create an interactive Grid without using SQL, as updatable SQL is somewhat complex and an advanced topic.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743008225473/ca0d200b-c893-4cc6-bfab-856f30fcfeea.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743008388720/cafc96fb-e976-4c71-a882-946882b8ce46.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743008401409/2a3cbf66-1401-42ea-9d84-f88284247980.png align="center")

while running the app if you get below error then fix the reference of D.ZIP\_ID lov

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743008534336/855ad0a2-807d-418c-ab1a-0bcceb6ba303.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743008579375/ee9bb88e-04ab-44ec-a78a-6378668951bf.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743008597858/8656c83a-62fb-4aba-bece-7f2599c6a239.png align="center")

This IG is similar to IR but includes row actions on the left for adding and deleting rows, and allows inline field editing if the edit option was enabled during page creation; if not, you can edit by going to single row view → edit.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743008923359/9658493d-0613-49e0-b762-8891bbccf272.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743008899373/393d0258-ef6b-448b-9a8e-d5e118505aae.png align="center")

### **<mark>Unique constraint on 2 columns. Add computation to a page item in form.</mark>**

Let’s modify DOM\_BREED column of lookup table DOM\_BREED\_LOOKUP and add a column ANIMAL\_CATEGORY VARCHAR2(15)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743048049390/cc5c7ddd-989e-4736-b29d-f583ce76c0bf.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743048186791/2bfc2676-f1f0-461b-998c-f6988507b8e9.png align="center")

Now lets drop constraint DOM\_BREED\_LOKKUP\_UNIQ.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743048442477/1a6ab593-aab6-4171-b2c4-e24bd85c82ed.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743048556527/e3d2029a-e510-45a8-a546-7f65c8b53dbf.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743048736080/1ae565af-d7c4-41ec-be19-d7f204ffc3fa.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743048772210/92a23d16-519f-4cf7-b650-78c1b567fcee.png align="center")

Now that we have populated animal\_category column, lets create check constraint on animal\_category saying column can’t be NULL and create composite unique key constraint for DOM\_BREED and ANIMAL\_CATEGORY.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743048930002/aa2f2d6a-fd61-4d07-bb2e-fbde48c7913b.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743049012752/e317b953-5689-4875-b4bc-b19cac55c958.png align="center")

update DOM\_BREED and ANIMAL\_CATEGORY to UPPER case.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743049266232/245f9add-bda2-47e4-8517-6a8ab12a31b0.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743049322680/69d0c475-ad7c-4bd5-a058-a66b7038d6b3.png align="center")

Now Change ANIMAL\_CATEGORY LOV RETURN value to be in UPPER case(edited manually)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743049522071/1f3620f9-f3f6-45df-8166-96d0101af490.png align="center")

Now lets change case of CATEGORY to upper case to make things consistent

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743049738230/a553d1f8-c6af-4da3-a579-ae57bde27a09.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743049820463/95e4dbd3-6f71-4072-a672-0ae7097c87d6.png align="center")

Lets delete page Dominant Breed Report and its corresponding form page (#8 and #9)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743049865830/51548eef-8009-4277-9e7a-86ad67d15250.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743050053466/82ff2707-a7ee-4555-ae95-6bb57596bda2.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743050097794/094ae973-72db-410a-8a64-17a91c439728.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743050121924/26e6cdde-85d6-465a-9bb2-1ec57d0a606e.png align="center")

Now add the page from scratch

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743050433459/7ee619cf-17df-40d8-9b5a-6a83a13950c2.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743050447656/ff4f9325-99f4-4abc-b77e-4f7d49747dbd.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743050484045/79dd9b27-c6c7-425c-8bca-805c74dbbdee.png align="center")

Please note that if you want to change the target of a menu item, you can do it from the shared component menu and update the target.

Now edit the form page layout to see and enter all field details in a single line.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743051137500/a89dab45-fa59-44d6-bc80-c4c5865d3d84.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743051152356/45bafd3c-cbc2-4538-9d7b-cd1b373c425c.png align="center")

now bring Animal Category label before Dom Breed

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743051283085/b28f1f58-ae5c-4156-b0b9-b773dab41278.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743051841753/b1201f41-667a-420c-88d0-2b30d6671c3b.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743051899779/8af758c2-e94d-4dae-a9b5-90569131d4f4.png align="center")

Entering the same values will cause a unique constraint violation error, but entering DOM BREED in lowercase will succeed incorrectly; to fix this, change the animal category to a select list and source it from the animal category LOV you created.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743051999896/806ad358-f3c0-42b6-b022-a9e50d228c14.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743052075936/c623c27d-9424-469a-aa12-25fa8a433a8d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743052243490/f89c09fa-839d-4986-9ce9-676dbdf3a195.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743052262136/d15b34b4-e269-4456-8765-55af0a6568ec.png align="center")

For DOM BREED lets create a computation

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743052311001/0844d8a1-92a9-435e-bcbe-0416a327c81d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743052427043/dd1bb138-cd4a-43b6-969a-b86da13ade73.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743052510619/66ea310e-07ea-4cac-b416-82e117d11bf2.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743052525014/38c72f8a-5576-4c41-832a-a82cd8abaf74.png align="center")

now delete old record for calico

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743052594777/c75e93dc-8dcc-4c71-8e6a-c6f2083aee94.png align="center")

### **<mark>Cascading LOVs: selection in one sets the list in other. Create after-update triggers.</mark>**

Lets edit the form page so that when category selected then corresponding Dom Breed should appear in Dom Breed Id field

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743167560253/946e86f1-576f-4bb4-8447-264c95e5de6d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743167629186/cc9e7277-8837-458d-ae23-b7e1cde738bf.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743167882582/fb7b1cd1-8582-422f-9720-e3f570115f27.png align="center")

Now, if you run the application and select the category Feline, you will only see the DOM Breed that corresponds to FELINE, and it works the same for others.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743168261629/25d47c1c-03d4-414f-b616-b8cee51d57e2.png align="center")

Now lets create a editable interactive grid Animal Grid

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743168763173/6d9200cd-4b4a-4c33-b904-58d52aa0df91.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743168775415/6b298af8-9bbf-4f6e-9ba1-48cbc9c96a52.png align="center")

Now rename Dom Breed ID to Dom Breed and bring that to after Category column heading

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743168861415/b50c27e7-020b-47ce-baea-586abc2d4650.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743168896329/22efe48d-5be5-4a09-9092-f30802686f6a.png align="center")

use up arrow in column section to get dom breed below category

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743168977341/ca52a715-46cc-4390-a63e-197cfddcb8ed.png align="center")

In the page designer, change the category type to a select list, source it from Animal\_category LOV, use dom\_breed as the source SQL statement, and update Parent columns and Items to submit under cascading List Of Values.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743169291888/b5172325-ed08-460e-9a33-631cb0891dde.png align="center")

```sql
select DOM_BREED as DISPLAY,
    DOM_BREED_ID as RETURN 
 from DOM_BREED_LOOKUP 
 where ANIMAL_CATEGORY = :CATEGORY
 order by DISPLAY
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743169449921/9b2838c4-a8d9-4162-b8c5-6e140512135e.png align="center")

Now, in the grid report, when you click to populate Dom Breed, you'll only see the breeds that match the selected category, such as Feline.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743169725789/5492ce6b-3330-45b1-91cd-00232e0a9c2a.png align="center")

Now, let's execute the script `triggers_before_update.sql` from the downloaded folder to create before-update triggers for each table (except lookup tables) that will populate the `date_modified` audit column whenever these tables are updated.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743170029239/894e3b76-1301-4e33-ab2e-146b209bcb05.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743170069902/b58162c8-67c9-4c93-8814-54b4889ce6d3.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743170012181/7268497f-e66c-4526-87dc-68ce6d27e89e.png align="center")

Now, when we edit anything, the DATE\_MODIFIED column is automatically filled due to the before trigger action.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743170252223/be7bacaa-0782-4a4a-8f4f-cc86f218ec6f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743170267557/c54c7a00-237a-41c6-a29f-997d1b76f625.png align="center")

### **<mark>Create a button and dynamic action in a form to calculate age.</mark>**

Lets bring Chip No, Est DOB, Est Age in one line in report so that some space will be there for a button to be created to calculate age.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743246762326/1e5915ce-6c9d-4229-8565-d0b7564802fc.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743246795854/1476e8ce-4601-478b-bdb3-b7e59ef5a5ee.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743247010325/04e7c36d-5bc1-4bac-921e-02c9222ecb17.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743247117154/32153bea-432c-400a-8ca5-5d2270d9f397.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743247200949/c6faf6f8-20fa-4599-8aff-bc1d79771ddc.png align="center")

Now lets add a dynamic action for this newly created column.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743247249412/c212b48e-7496-4959-8ab1-02d5519eb7e6.png align="center")

Do these require field value changes for the new button's dynamic action.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743248020666/32150a05-4e7b-403a-9f4f-3e3c0ace9037.png align="center")

Verify this by changing Est DOB and notice that the change is reflected in the Est Age field, as we set the affected elements to P5\_EST\_AGE.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743248350769/8a1eb041-349a-474b-8c69-171eff3c9a59.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743248369684/058b632c-bb6e-4fe8-8005-ed2bd76dc1d3.png align="center")

### **<mark>Create page groups to organize the application web pages.</mark>**

Page groups used to organize pages, including a group for pages that may be deleted later.

We’ll group the web pages based on the purpose within the overall application. so we’re going to have groupings based on the parent pages those are just the landing pages that you see when you click on navigation area if you click on Animals then you see an introductory or parent page before you select a particular report or form for animals . so Lets have Group parent pages, Animals, People, Maintenance, Other.

We’ll start by creating another form and report for data maintenance. Lets create a Interactive Report.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743251899168/e570de1b-ffab-4c0a-b100-21e0b94755b5.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743251909547/ed0c7bc6-f3e8-4f86-b001-e4b993d345c9.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743252004701/adaa8c32-76bb-4a0d-ae25-ccf61c3ccbba.png align="center")

Now Lets create Interactive report page for subcategory.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743252226736/8902700f-022c-4acd-86e7-5968f35bfe09.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743252235735/e1994705-c596-41f6-b100-f3293466cc5c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743252249925/39de8b66-9fd5-427b-8226-7a746ff333a2.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743252259939/897cf387-1faa-443d-b06f-e5b36ad3443a.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743252643854/d2de90d7-f19f-4f5e-ae5b-7546717ec75a.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743252673674/f5f317b7-dd35-46e8-acd4-4441d8f30b8d.png align="center")

Now lets organize these pages. Goto Utilities → Page Groups → Create and then create groups based on requirement.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743252798077/e1930811-93a2-41dd-8a49-a13590096291.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743252812936/c0981cb6-4eb7-4dc8-bfd3-b78e1b4798fb.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743252832661/6ecceb60-5ced-4d9a-bb9a-bb99d773d983.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743252985798/e12f9ec6-bff1-4ad9-98ee-08cb15cea93f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743253013819/a4c4d7ff-2d28-4b01-ba8d-2c2543243e45.png align="center")

Similarly create other groups Animals, People, Maintenance, Other.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743253165860/4f63a9ae-f146-45e4-915d-faa5127c2d61.png align="center")

Now let’s do Page Group Assignments by clicking on Page Group Assignments or from page designer pages. In page designer assign page group for page List of Animals report page. save and verify same from Page Group Assignments section in Page Group.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743253350607/5c45d50b-1844-4328-8b68-99c499704f21.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743253426195/126455ee-beea-4596-939d-b1b600858e40.png align="center")

Now go to Up and note down each page number, then decide which pages you want to put under each page group. For Animals, use pages 10, 2, 5, 4, 8. For People, use pages 11, 13, 14, 15, 26, 16, 17, 19, 20, 25. For Data Maintenance, use pages 12, 6, 7, 9, 29, 21, 22, 23, 24. and rest all assign to Other Page Group.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743256113434/3e7d7a49-d3d7-4c0b-9dc7-488474df3ce5.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743256437115/af1e36d4-0ec6-42c8-aed2-9fcbd1e66eb5.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743256447115/fa64fe64-0182-4f32-ad27-aad4cfeabd55.png align="center")

Now to see pages by groupings click on Pages by Page Group.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743257108669/b20e248b-32e3-4782-bdce-6eccd0f21f37.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743257114631/b33d000b-dd0e-4d53-9ca1-de37c6c030ee.png align="center")

Now return to the application page and search by typing the page group, as shown in the example where we searched for Other.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743257212071/4f2e94b0-60e4-4c97-a43c-b24d90cb5677.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743257370604/32fcaf5f-7223-46a3-9a1d-094da6e081b3.png align="center")

### **<mark>Look at the 3 layout options for master-detail forms.</mark>**

We will create master-detail forms for Activities and transactions related to Animals.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743258124302/590575e0-571c-4d88-a4a3-d5efb6c59806.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743258157835/92a8f37e-faf6-4a35-bd9d-4ef603650ebb.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743258238876/5ae02bd0-3ed2-4191-a4a2-b34a950ee222.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743258258812/be7b0710-a5d7-4929-adf8-2a262bedad76.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743258450670/ecf0cb78-8698-4047-a97b-f3c4bdc84cef.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743258459216/d95c9f66-1257-4309-9f01-5558ba22f7f0.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743258474425/f0f4d732-507b-4ab3-9016-a1b478786bac.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743258497920/332db3fe-cb1b-4afa-aa57-c22f6041dbc5.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743258615276/d0de40f1-0965-42f2-8f1d-ef5bc13386fd.png align="center")

Selecting an animal from the master report shows the related transactions on the details page, and for a better view, we can change the Type attribute under pagination to Page and set rows per page to 5 to see both master and details on one page.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743258963011/fa080b0a-4fb0-4208-84ab-9a9c553ee122.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743258975159/41b965de-d835-42b5-9eda-048dc84b4c42.png align="center")

Let's change the headings and identification type of Dom Breed Id and Status ID to select lists.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743259232633/a4df20ef-9b45-4ac4-b874-560baf1c724a.png align="center")

Now lets create a master-details report for Animal Activities. Plan is to see both transactions and activities for selected Animals.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743259492047/35752681-4c97-47f3-9340-5b33d3d68428.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743259512776/90220167-f634-4e73-9935-3f7f2dd6d4fd.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743259653874/a74d0c6d-dd02-44d2-9a08-4cc099b72763.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743259761731/00afabc0-8185-490f-8f59-4d97ff66893c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743259775844/5331c1af-c998-4633-9082-324f2e9c8623.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743260049079/823d1113-534e-44f7-9554-f85ea540d620.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743260191696/d2cd8bfd-7ffc-41ba-bdd3-025b21da12f2.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743260411796/814bd7f4-c207-457c-9bca-8bfe081e3746.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743260423714/5954eceb-1582-4265-a40d-e6f563aaac24.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743260080946/a10dc2a1-4371-4adc-bb30-9d3c2e42f8f9.png align="center")

Now let's create a drill-down master-details report page.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743260506123/14326675-a798-4652-9ce9-0b0806755ad2.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743260619175/fa7eb67c-b32c-4d91-a2a7-703e9005767c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743260669392/33207028-2712-404e-97aa-39d8a41263a9.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743260835260/56fc288a-c228-454a-a28d-227725538383.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743260857760/befb9f13-4bcc-4fd9-b21b-80bd8d05f152.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743260954312/3f491af5-c03d-43db-8e4a-54a993039313.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743260976151/b4e412cf-d4e6-4b7b-b4fb-80c3fb15fba0.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743260983665/3d539e27-945a-43e6-91b1-25213444a2e0.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743261468327/b9d91243-332c-43a8-83ea-39d7596caf2a.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743261495319/ab03d79d-c981-4166-b04b-b28ab77920f3.png align="center")

Lets add a page item to see animal pic which will enhance visibility for single row edit for.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743261808457/8b260584-dcc6-4cdf-9a31-d05ab868f528.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743261827302/782d145e-54e9-47d5-9415-ce20dddaee70.png align="center")

If you get an error saying "column ambiguously defined," try debugging by enabling debug mode to check the debug info, or delete the ANIMAL\_PIC item as it might duplicate the newly created item P34\_PICTURE.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1743263926671/5369bd28-48c5-4b7a-98a9-fe80fcbe5363.png align="center")

**THE END**

## [FAQ](https://drive.google.com/drive/folders/1NzeOPTnrq2nd9GkjEHdI_p4TBQ8foxWC)

1. **How to enable RESTful services in ORDS?**  
    [You can refer to this blog for the answer.](https://panigrahisantosh.com/rest-enabling-the-hr-schema-in-oracle-ords-a-complete-guide)
    
2. **How can you debug an Apex app?**
    
    Enable debug mode from the dev toolbar to view debug info, or add a message and check the SQL right after it in the debug info to help, as shown in the example below.
    
    `APEX_DEBUG.ENABLE(apex_debug.c_log_level_info);`  
    `apex_debug.message(p_message => 'Santosh Panigrahi enabled Debug. SQL below:');`  
    `apex_debug.message(p_message => v_sq1) ;|`
    

You can also refer this video [APEX\_DEBUG](https://youtu.be/VVr8dybBeuE) from ERPStuff

---
