I need Import to do only inserting without updating existing records

  • 0
  • 1
  • Question
  • Updated 2 months ago
  • Answered
Hi everyone, I have a table that I want to import my spread sheet data into it, without updating my existing records. I don't have Record ID as my Primary key. My table has its own PK. When I try to import it doesn't give me any option to select only insert without updating the existing records. Please help. Thanks.
Photo of Mehdi Maskoot

Mehdi Maskoot

  • 90 Points 75 badge 2x thumb

Posted 2 months ago

  • 0
  • 1
As long as you have the primary key field in the xl that you are importing from, quickbase will only insert/update. If you want to only insert, I would consider removing that column from the XL.
Photo of Mehdi Maskoot

Mehdi Maskoot

  • 90 Points 75 badge 2x thumb
Remove the PK from my XL??? :)))
How does QB know the value of my PK field then???
I am receiving the XL from a customer and it has thousands of records that I don't know what records are new. I guess QB needs to redesign its import then.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 63,758 Points 50k badge 2x thumb
This can be done with some extra setup.

You can import your data into a temporary import table where the Key field is your own PK.  The based on a relationship where that is the parent make a relationship to the real data field based on a reference field on the child side of the PK field.

Then make a summary total of the # of existing data records.  Then either using a saved table to table import or a manual  "copy these records to another table:, filer the record based on # of existing data records = 0.

That way it will never import and update existing records.

When you get the next XL file, you purge the temporary import  scratch file data and start again fresh.
Photo of Mehdi Maskoot

Mehdi Maskoot

  • 90 Points 75 badge 2x thumb
Yes, I was able to do it by creating an Action.
But, why QB team doesn't simply provide a checkbox to ask if user wants to also update or he/she only wants to insert.
They are checking for existing records anyways. They could simply ignore the existing records based on the user request and it would be even much faster to only insert.
Thanks anyways.