Script for inserting document into container automatically replaces existing content
Goal: Paste multiple documents into a container associated with one record.
Portal solution: I created a related file for the purpose of holding the documents and organizing them in a portal. I set up the portal, and a script as follows:
Go to Portal Row [Last]
Insert file [Reference; RelationshipName::RelatedField]
Problem: It works the first time. But every subsequent insertion replaces the existing one. I can only get one insertion per client record (one portal row). I tried everything I could think of (go to portal row, last; made sure the field was not set to select all, etc.).
Repeating field solution: I decided it didn’t necessarily need to be a portal, since I could accomplish the same thing with a repeating field (and the limitations of repeating fields don’t really apply here). I created a repeating field in the main file, with multiple repetitions (12). I then created a script as follows:
Insert File [Reference; MainFileName::FieldName]
Same result – it keeps pasting in the first repetition cell. I’ve tried “Go to Next Field,” to no avail. I can’t figure out how to make it paste in the next available repeating field cell.
Any ideas would be appreciated.