Dec 28, 2023 02:12 AM
I am using the Update Record action type in airtable automation. However what I notice is that it completely replaces the existing data in that cell and overwrites it with new data. Is there a way to update the record by appending new data to the already existing data without overwriting?
The field that I am updating is a linked record and would already have some ids existing. I just want the update record to append new ids to the existing list.
Dec 28, 2023 12:44 PM
Hey @cshenoy86 ,
For some reason I wasn't able to do this in a single step but luckily the solution is still pretty simple.
You'll need 2 Update Record actions:
On the first, input the existing field data and the data you want to add separated by a comma.
Then create another Update Record action and insert the value from that same field in the first Update Record action:
Then the new values should be appended instead of overwritten.
Dec 29, 2023 03:08 AM
I tried using this but this is what happens
Say there are already 2 records Test 1 and Test 2 and the two updates need to append Test 3 and Test 4. What happens is Test 1 is retained and Test 2 is replaced by Test 3 and Test 4 even though already existing as a linked record gets added as a new record with an altogether different name.
My automation flow is like this
Here is my first update
Here is my second Update
Somehow in the second update, I am not able to retrieve the ids of the linked records. How is that possible?
Dec 30, 2023 02:36 PM
Hi,
if you want to link to more records, act from other side. Update these records by linking them to the initial record. Loop using repeating group.
Jan 01, 2024 02:14 AM
Thanks for this. However since it is a many to many relationship between the two fields, the issue persists. So even from the other side when linking there are chances of having an existing value already there. As of now I have used script to mitigate this issue which takes all the existing values and then appends new values to it.
Jan 04, 2024 02:49 AM
Well, I can't suggest about your automation because without screenshot it's not clear what are you trying to do.
I just want to say that ID of record to update supposed to be a single value, not a list of IDs. With list it can work, but I think it consider only the first ID. For multiple update, repeating group should be used. But if you were able to apply the script, it's a most flexible and reliable way in your case.
Jan 04, 2024 06:31 AM
I found out about the repeating group for multiple groups and I think that can work, Basically this is what I was saying when I said the linked relationship is many to many.
The linked relationship is between columns from two tables. And both columns can have multiple values. So that was creating an issue.But now with repeating group it might work.