You could put those steps inside a loop that loops through the records of your found set with Go to Record/request [next ; exit after last ] as the script step to go to the next record and also to exit the loop after reaching the last record But you'll need to set up the script to switch back and forth between two layouts, one based on the table where you have your found set and one based on the join table were you create new records and assign the values of your variables to the fields of the new record. And then your script has to switch back to the other layout before tying to go to the next record and loop...
Note that it's also possible to use Import Records to move such a block of data followed by a Replace Field contents action to assign the correct value to link it to the ID of the record from the "other table" of your many to many relationship.
Thank you, after messing around with this for a while, I think the following script is working well and doing what I want. If another user already added a found set to the join table, do you have any ideas on how duplicate values could be prevented or deleted?
Duplicate Joint table records are usually records where the foreign key fields (the match fields) to the two other tables are both the same. A quick validation field option is to define an added text field with an auto-entered calculation that combines the two values:
ID_SAM & " " & ID_SHOW
You can set a Unique Values validation on this field.
You can then use this in your script:
Set Error Capture[on]
If [ Get ( LastError ) //duplicate record ]