1 Reply Latest reply on Jun 22, 2017 4:35 AM by erolst

    Check if record exist + IF function

    alexissindicic

      Hello Filemaker Community,

       

      I have three tables

      a) Campaign

      b) Contact

         has : website_url_clean field

      c) Join_campaign_Contact

       

      I have managed to create an import script (thanks to this amazing community) that will import contacts in the contact table.

       

      I am looking for a function that will allow me to test, in my importing loop, if i already have a record with the same website_url_clean field.

      Then

      If the result is No -> I can move on and create the correct record

      If the result is Yes -> I can link the already existing contact to the Campaign i'm working on

       

      Basically i just need to understand how to test if a record in the database is already matching the record i'm trying to import.

       

      Many thanks for your ideas

        • 1. Re: Check if record exist + IF function
          erolst

          If you set the validation of the field to unique, any records that violate the validation rule are not created, i.e. imported.

           

          alexissindicic wrote:

           

          I am looking for a function that will allow me to test, in my importing loop

          If, OTOH, you don't import directly, but via an intermediate ('scratch') table, simply define a relationship between that table and the Contacts table via the website_url_clean field, and test on e.g.

           

          not IsEmpty ( Contacts_importcheck::id )

           

          which is True if there is already a record* with the same contents in the website_url_clean field.

           

          *One or more.