Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Create related records with a loop

Featured Replies

Hi

My issue is this.

I have one table, Procedure to audit (id, date, fk_procedure (the procedure/area to be audited). Then I have another table, Questions to answer in the audit (id, question, id_procedure)Then I have another related table, which we can call Items checkced during internal audit. (id, fk_Question_id, answer, non-conformance, actions, corrective actions etc.)

Then I have a table, Procedures (id_procedure, procedure name, etc.).

What I am trying to do is:

When I conduct internal audits I want to create one or more records in the procedure to audit table. Then when I have selected what procedure is audited I want to click a button and create series of Items checked during internal audid based on the questions related to the procedure.

The Pseudocode (sauðakóði in Icelandic) may look like this:

create a new record in the procedure to audit table

select the procedure to be audited

press a button

create new records in the questions to answer table based on the questions related to the procedure

Does this make any sense to you?

Any help appreciated.

Regards,

Reynir.

I got lost in your explanation. I think you are describing something like:

Questions >- Procedures -< Audits -< Items >- Questions

and you want to pre-create the Items records, based on the selected procedure's questions?

If so, you could find the relevant questions (by going to related records after selecting the procedure), import them into Items and replace the AuditID with the ID of the current audit.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.