AnsweredAssumed Answered

Loop to copy from one list of records to another

Question asked by brenseec on May 16, 2018
Latest reply on May 16, 2018 by philmodjunk

Hi All,

 

I'm creating a little inspection app,

Basically I have a table with a list of questions, this list needs to be controlled.

 

I then have a table for the audit which has a relationship with another table called audit questions

Real.png

What I want to do is have a script to "copy" the list of questions from the questions table and then set the fields in a portal row (portal is of AuditQ's table) on the Audit table

Audit.png

 

The script I have set up will only set the first field, hence why I need a loop,

This is the script that currently does this

S1.png

 

This is my feebly attempt at a loop script that does not work

S2.png

 

I'm pretty new to loops but I'm guessing I need some sort of iteration to go through each Question record, store as a variable and then loop through the portal to set the fields. I have attached a sample file.

 

Any help on this would be great

Attachments

Outcomes