How to copy file attachments and images between records?

Tap Forms – Organizer Database App for Mac, iPhone, and iPad Forums Script Talk How to copy file attachments and images between records?

Viewing 2 reply threads
  • Author
  • January 4, 2020 at 7:40 PM #39090

    Sam Moffatt

    I’m working on a merge record script to be able to take two records and merge them together. This isn’t too bad for almost all of the field types except for the photo and file attachment types. How do I copy the attachments from one record to another for the file and photo fields?

    January 4, 2020 at 8:10 PM #39092


    If you’re copying the values from one record to another, when you call getFieldValue on a field ID for a record, Tap Forms will store that record’s internal ID in the dictionary associated with each photo in that Photo field. Then when you call setFieldValue on another record, Tap Forms will then use that internal record ID to get the attachment and set it on the destination record.

    It does this both for Photo and File Attachment fields.

    So it should hopefully just work :)

    January 6, 2020 at 2:24 AM #39095

    Sam Moffatt

    Still working through this but one quirk is that I can copy the same attachment file name more than once to a record but if I use the UI to delete one of them, it breaks the other photo field attachments that were duplicated.

Viewing 2 reply threads

You must be logged in to reply to this topic.