disabled_Luna.media

How to import and update/extend to a table?

Discussion created by disabled_Luna.media on Feb 8, 2014
Latest reply on Feb 9, 2014 by keywords

Hi,

 

I wonder what is the best strategy to import data (like contacts) to a certain Table "myContacts" from an external data base. The issues are

 

  1. that already existing contacts should get updated.
    And I know that there is an import option to do so if (and yes there is!) a key field can be used to identify records in the internal as in the to-be-imported-external table.

  2. that new contacts in the external data table should be added.
    And my understanding is that the import-features do not support that.

 

How can I update and add contacts in the target-table in my filemaker database best? Did I overlook a built-in feature?

 

Or do I have to write a script. If yes, how should it work? I would consider the following:

 

  • import to a new, empty copy of the target table
  • loop through this table record by record
    • check if the record is already present in the target table
      • id yes: update fields of the existing record
      • of not: create a new record and insert the data to it

 

If this is the way - is there a ggod way to to the upset or insert of all the fields of the source record? Or do I have to implement that for each field?

 

Thanks for advice, Luns

Outcomes