3 Replies Latest reply on Feb 20, 2015 7:33 AM by philmodjunk

    Importing/Exporting Database

    ToddNolan

      Title

      Importing/Exporting Database

      Post

      I'm confused as which way to go.

      I currently have a database with: clientIDTable -> clientsTables -> policy_Table

      One clientIDTable record may have many clients(husband, wife, children), which inturn may have many policies(dental, medical, etc).

      I know how to save a copy of the entire database as a fmp12 file, but my question is this:

      How do I import someone else's database into my own database yet keep the related tables? Currently, when I just import one database into the other, it adds the new records of clientIDtable, but nothing from the clientTables or policy_Table? The reocrds from the clientIDTable are useless without the related tables connected to it.

      Is this something I'm going to have to script (and be a very drawn out script at that) or something simple I'm missing?

       

      Thanks everyone!

        • 1. Re: Importing/Exporting Database
          philmodjunk

          Imports are one table at a time and do not import relationships. Relationships linking tables in Manage | Database can only be created/changed manually. They cannot be scripted.

          A single script can certainly import data from more than one file and/or into more than one table using a series of import records scripts, but I wouldn't describe a script importing data into three different tables as "a long drawn out script" unless there is some additional processing of the imported data needed--such as assigning match field values to newly imported rcords.

          • 2. Re: Importing/Exporting Database
            ToddNolan

            Thanks Phil. This is kind of what I was thinking. If I'm following you correctly, I simply should write a script that imports:

            importclientIDTable to currentclientIDTable

            importclientTable to currentclientTable

            importpolicyTable to currentpolicyTable

            My issue with this process is, when I'm playing around with the import function, it doesn't allow me to add records to the currentclientTable. it only allows me to add records to a new currentclientTable_2 instead. The only table not grayed out is currentclientIDTable. Is this normal?

            • 3. Re: Importing/Exporting Database
              philmodjunk

              To manually import records in to TableA, first go to a layout based on TableA. Selecting a layout also selects the target table for your import.

              But if you set up Import Records as a script step in the script editor, you will be able to use this target table drop down to select a target table no matter what the current layout.