Forum Discussion

HannahDrake's avatar
HannahDrake
Qrew Trainee
4 years ago

How to import data and IGNORE matched rows? ONLY add new!

Hi all,

Searched the forum yesterday and found the idea of a temp table/new report on "new"/then import that remaining table, BUT is there another way to - on import - have QuickBase NOT update any matched rows based on a key field, and ONLY add new?

-Hannah
(PS tried posting this yesterday, not sure what happened but it's not in my post history!)

------------------------------
Hannah Drake
------------------------------
  • Can you tell me if your target table has a custom key field that is not the native record ID?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • HannahDrake's avatar
      HannahDrake
      Qrew Trainee
      If target table means import destination, it does. This custom key field is a numeric string.

      ------------------------------
      Hannah Drake
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Yes, this is easy.  Make a Staging table by copying the Real table so that the field names match.  There is an option for that on your current table under the More menu.

        Create a field on our real table called [Record Already exists?] with a formula of true. 

        Import some sample data.

        Make relationship where one Real record has many Staging records based on the matching field on the Staging table.

        Lookup the field for [Record Already exists?]

        Make a saved table to table import to import the records from the Staging table to the Real table where [Record Already exists?] is unchecked.

        OK now that you have this setup, what i do for this technique is to make table to hold a single admin record. 

        Create a buttons to really dumb down the import process.

        1. Button to purge the import table.  Hide when the staging table is empty.
        2. Button to land the user on the native import screen to import into the Staging Table. Hide when the staging table is loaded.
        3. Button to run the saved table to table import.  Show when the staging table is loaded.

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------