Upsert records without deleting existing records in Airtable

Hello All,

My goal is to migrate data from a google sheet to an Airtable base to link them.
The context is simple, I have a list of orders and each orders create a new customer in my customer table.
If a customer already exist, I want to add the new order and link it to the customer records.
But when a customer is already in the table, the records of the orders is not appended, it is updated, which means that he delete the first one to replace by the latest one. Whereas, I want to add it into the records without delete this orders into the customer records.

I’ve tried smart links and many more but I can’t find a way to append them without delete the older order who were already appended to the customer records.

In this screenshot, you can find the final result, What I’d like is both of them having the records of the customer linked to this order without deleting the first one because both of them are an order of this customers.


Thanks a lot for your help !

@Vivien_Chantrel

The Update module will replace the field value with the new value. To prevent the removal of existing values, retrieves the previous value from the search, combines it with the new value, and then updates the field accordingly.

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support
Visit us here
Youtube Channel

1 Like

Hello,

This is not an update but an upsert module.

As you can see in the screenshot, I already have a search module before the update to determine if he has to create a new records or upsert into the new records.

I dont want to update, I want to insert new order into the same customers.
The smartlinks doesnt do anything.

“If smart links is enabled, you can a) use names in linked record fields instead of record IDs to select an existing record or create a new one if it doesn’t exist b) use (add) new options in single/multiple select fields.”

Hi @Vivien_Chantrel

Utilize the “create a record” module in your workflow. Here’s a sample workflow illustration:

Additionally, remember that when updating records, ensure that you merge the previous data you want to retain, otherwise it will be replaced as empty.

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support
Visit us here
Youtube Channel

1 Like

Hello,

Thanks for your answer, but this is what I do with the Upsert module.
If the customer does not exist it will be create, otherwise, he will be update it.

But me, I want to append the record id of the order into the customer records. The problem is it overtake all the last order who was linked instead of linking a new order.

Hi @Vivien_Chantrel

Just appending new data will overwrite the existing data. In the example given below for status , the existing data is in array format, so new data must be added in the following format. Similar approach for the name field also.

3 Likes

Hello ! @Msquare_Automation !

Thanks a lot for your help.

Basically, I didnt do what you told me to do because it was not specifically working for my case but I have found the solution.

I changed the sense of the airtable module to get this.

I’ll search then upsert and then, create the records and link it to the record.
My sense was not right at first.

Thanks for your help, even if it was not the right solution, you taught me something and found then the solution.

Have a great day!

3 Likes

Thanks for sharing these insights mate as I found it very much useful and informative.

2 Likes

Hey there @Vivien_Chantrel :wave:

Just wanted to stop by and say congratulations for the great solution! Thank you very much for sharing with us as it’s helpful for other Makers as well.

Keep up the awesome job! :pray: