Unlink all linked records?


It seems that in order to remove all records from a linked field type during a patch/update, you have to always have at least one valid record id to include and keep linked. Otherwise, if try to update with an empty array (to clear the data out presumably) it gives an error that the record id is not valid.



I may be wrong, but cannot delete this.
I think I had an externality causing this behavior.



Hey @sull
Let me see if I can also recreate, because I’m current writing a tutorial on Airtable and linked records.
You want to unassign the records from the linked table but keep them in their original table correct?

1 Like


You can do this using a PATCH on the record, and set the linked field to null. That will remove the links, but preserve the records in the other table.

For example, if record A has field “Links” which contains records B,C,D. I would issue a PATCH to record A with {"fields": {"Links": null}}. After the operation completes, record A will no longer link to records B,C, and D, but the records still exist in their corresponding table.

Alternatively, you should be able to send an empty array. I just tested on one of my bases and it worked using {"fields": {"Links": []}}



Yea I used an empty array but nice tip on the patch

1 Like


Thanks for the info, folks.



yes, that is correct.