The new 'Export Linked Records' feature

Viewing 4 reply threads
  • Author
    Posts
  • November 19, 2012 at 7:14 AM #5552

    jolinwarren
    Participant

    First of all, thanks for the new ‘Export Linked Records’ and ‘Export Media’ features. Excellent! However, I have a couple of questions:

    (1) When exporting linked records, it seems that, if ‘Export Record ID’ is also switched on, the linked records contain the Form ID, Field ID, and Record ID(s) of their parent(s). However the exported parent records do not contain the Record ID(s) of their child(ren). The linked records column in the exported parent form is blank (except for the header row). It would be useful to have each parent record contain the Record ID(s) of their child(ren). To my mind, this is more logical as well and would probably work better if trying to programmatically work with the csv data (using AppleScript for example).

    (2) More importantly for me, it does not seem possible to re-import a form with its linked records. If I export a form with linked records, I get the zip file that contains a csv file for each of the parent and child forms, listing al their records. If a record is linked to multiple parents, the child csv has duplicate records that contain different parent IDs (because of (1) above). But if I then re-import the parent and child csv files to Tap Forms, I get two new, unlinked forms. So I can’t use this feature to export my data from a form and then re-create it, links and all, on the same or another device.

    I don’t know if I’ve explained this very well, so let me know if clarification is needed. These aren’t urgent issues for me, but it can be useful to be able to move data between forms or devices without sharing/syncing everything.

    Thanks,
    Jolin

    November 19, 2012 at 1:07 PM #5561

    Brendan
    Keymaster

    Hello Jolin,

    The exported parent CSV file will contain an aggregate calculation if you had set one up on your form for the child records for each parent record. Otherwise it’s blank.

    I don’t think it would make sense to have the child record IDs in the parent form because it wouldn’t even make sense to import that unless the child records already existed in the database at that point. So you would really want to import the parent form, and then import the child records form.

    After you import the parent form records, you will need to tell Tap Forms what kind of linked fields you have. I guess I could stick this in the field type tags. E.g. <form-one-to-many> or <form-many-to-many> then Tap Forms would know how to re-create them before importing. But then it would also need to know more information about the child forms too, such as their names and IDs. It could get messy.

    So for now, just import the parent form, then you could import the child form and then just delete all records in the child form, setup your parent’s Link to Form fields properly, then re-import the file into the child form. Tap Forms will know how to deal with the many-to-many relationship and will insert into the join table.

    Thanks,

    Brendan

    November 20, 2012 at 7:11 AM #5564

    jolinwarren
    Participant

    So for now, just import the parent form, then you could import the child form and then just delete all records in the child form, setup your parent’s Link to Form fields properly, then re-import the file into the child form.

    That makes sense. I didn’t think about the fact that the linked field needed to be set up again, so I only did the first two steps. Deleting the records, re-creating the link, and re-importing the child records works well. Thanks!

    November 20, 2012 at 6:10 PM #5570

    Brendan
    Keymaster

    It seems the field-type tags I was typing into my post before got hidden. I’ve updated my response to show that. But I’m glad it’s working for you now.

    Another thing to do instead of importing the child CSV file, then deleting the records is to just email the parent form template to another device first, then import that. Tap Forms bundles the parent form and all its child forms (and their child forms) into the .tff file that’s created. Then, when importing, you wouldn’t have to setup the links again. They’d already be there. Just import directly into the parent form and then all the child forms. Tap Forms will shuffle all the child records into the right spots so they appear properly linked to the parent records.

    Thanks!

    Brendan

    November 21, 2012 at 6:43 AM #5572

    jolinwarren
    Participant

    That’s a great idea. I wasn’t thinking about this right. :-) I will definitely use that method in the future, it’s simpler and cleaner. Thanks again.

Viewing 4 reply threads

You must be logged in to reply to this topic.