File Attachments Field: import/export and searching

Tap Forms – Organizer Database App for Mac, iPhone, and iPad Forums Using Tap Forms File Attachments Field: import/export and searching

Viewing 2 reply threads
  • Author
    Posts
  • February 19, 2017 at 9:48 AM #21207

    Mike Schwartz
    Participant

    As a consequence of my issue with “ghost favorites” I exported my 4 custom forms and then imported them into a new database document. One of the forms has a File Attachments field. I was surprised that none of my file attachments came across. They are all file aliases and not embedded files, but why wouldn’t the aliases carry over?

    I can pull up an older version of the previous database document, which still has the contents in the File Attachments field. So I wanted to filter the form to select just those records with attachments — Search Rule: [File Attachments] [is not empty]. The search yielded no results. I then tried Search Rule: [File Attachments] [contains] [pdf], and again, no results. Does searching this field only work with fully embedded files rather than aliases?

    Finally, would I be able to restore the File Attachment info by opening the database document packages and transferring the Attachments folder from the old database to the new one? Or would that be a disaster because the record IDs are different?

    Thanks,
    Mike

    February 19, 2017 at 3:49 PM #21215

    Brendan
    Keymaster

    Hi Mike,

    I’ve solved the Ghost Favourites problem as I mentioned in my email reply to you.

    Tap Forms doesn’t export the file attachment aliases because as in general there would be no reason to do that since normally if you’re using the Export Tap Forms Archive function you’re sharing that with someone else and aliases would never work anyway. So I left them out. But I’ll reevaluate that if it’s something critical to your workflow.

    The search won’t turn up the alias files because they’re not stored in the database at all. There’s not even a reference to them. It’s those whacky folder names that Tap Forms uses to identify them from the file system at the moment you click on a record that has the File Attachment field with aliases in it. It merges the names of the files with the names of the files for regular attachments. Whereas for regular attachments, since those are stored in the database, there’s a direct reference to them which can be indexed in the search engine.

    I haven’t tried doing what you suggested with transferring the Attachments folder to a new database. Give it a try. It’s not going to hurt anything. If you use the Tap Forms Archive function with a new database, Tap Forms will re-use the unique IDs for the objects it imports from the archive. So in theory it should work. It never hurts to try. You can always make a backup of your document if you’re worried about it.

    Thanks,

    Brendan

    February 19, 2017 at 7:00 PM #21218

    Mike Schwartz
    Participant

    Thanks for the thoughtful and detailed reply. My use case involved exporting to myself to aid in recovery from a potentially corrupted DB document. Hopefully that’s rare. I see your point about aliases not being useful generally if you’re sharing with another person. Perhaps an exception to that would be for two people with separate accounts on the same machine, and the aliases point to files contained in a shared folder. Or what about aliases that point to files on a server or NAS, available to multiple parties?

    Thanks for clarifying the constraints on searching for file attachments.

    I performed the “transplant surgery” for the Attachments folder, and it actually worked! Before doing so, I manually reconstituted the attachments (aliases) for a single record in my new DB document, and then compared its Attachments folder to the one inside the old DB document. Each had an identically-named subfolder beginning with “fld-“, and an identically-named sub-subfolder beginning with “rec-“. So I kinda suspected that things might just work with the transplant.

    One minor peculiarity after the transplant was that the icons in the File Attachments field were regular PDF file icons without the little “arrow badge” that indicates an alias. That bothered me enough that I ended up deleting and reconstituting all the attachments for the 9 records involved. Surprisingly, that had the secondary effect of eliminating the cosmetic bug I reported earlier, where sometimes the attachment icons would disappear until I briefly hovered the cursor over the item.

    So all is good, now. Thanks again.

Viewing 2 reply threads

You must be logged in to reply to this topic.