Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to Save Multiple Records in One Submission?

DannyS-OracleJul 5 2016 — edited Jul 6 2016

Hi guys, I am fairly new to Apex and I have trouble trying to solve this case. Hopefully someone can help me here!

The simplified case is as follows: let's say I have a checklist to verify if a house is in good condition or not. Something like this:

House Inspection #99

| Criteria | Result | Comment |
| The water is in good quality | Satisfactory | No broken pipe found inside the house, water is not contaminated |
| The lighting is fine | Unsatisfactory | Only one window available in the living room |
| The wall is sturdy | Satisfactory | No hole in any wall |

There will be many more criteria coming - let's say there will be hundreds of criteria. So I plan to separate the criteria to another table in my database:

Table 1: Criteria List

| ID | Criteria |
| 1 | The water is in good quality |
| 2 | The lighting is fine |

Table 2: House Inspection

| ID | Inspection_ID | Criteria_ID | Result | Comment |
| 1 | 99 | 1 | Satisfactory | No broken pipe found inside the house, water is not contaminated |
| 2 | 99 | 2 | Unsatisfactory | Only one window available in the living room |
| 3 | 101 | 1 | Unsatisfactory | Broken pipe found |

So there are actually two questions here:

  1. How can I make Apex to automatically generate the form fields for each criteria listed in Table 1?
  2. How to save the multiple records into Table 2? Here is the mockup form which I want to generate in Apex:

Screen Shot 2016-07-05 at 7.39.54 PM.png

Any help will be appreciated! Thanks in advance!

P.S. I am using Apex v5.0

This post has been answered by PMON on Jul 5 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 3 2016
Added on Jul 5 2016
2 comments
578 views