Just to update on this, I seem to be able to either duplicate the first one, or end up in a never ending loop -
what I was doing was trying to write a script that went to the related records, duplicated them one by one and then changed the visit id for the duplicated ones only to the current visit id thus leaving the old ones alone and having new records related to the current visit that he could then edit or delete as required
I'm fine with the first record but then it all goes wrong
:-) Thank you!
Haven't tried it yet, was just bumbling around trying another script where I've managed to duplicate the records by creating a variable (the original count of records) and duplicating until the new count is 2x the variable
I was just then adding in the step to update the 'visit number to the current visit on the new records - just trying to work out how to exit my loop on that one (if that makes sense)
but - if I cant figure out the end of my loop
I will give your solution a go. I had wondered what omit record was used for - and the explanation makes sense :-)