Skip to main content
Solved

How Do I Clear a Records "Linked Field" Value Using Script?


  • New Participant
  • 1 reply

I am really struggling to do something as simple as "clear" a records linked field value.

I have tried... 

table.updateRecordAsync(r, { "Linked Field": [{id :''}]}); table.updateRecordAsync(r, { "Linked Field": [{id :null}]}); table.updateRecordAsync(r, { "Linked Field": []});

If anyone can let me know how to clear a records linked field that would be amazing.

Thanks

Best answer by Ben_Young1

Hey @Mono

Someone asked a similar question in this thread.
The short answer is that you need to pass an empty array to the linked record field.

It should look like this:

table.updateRecordAsync(recordId, { "linked_record_field": [] });
View original
Did this topic help you find an answer to your question?

3 replies

Ben_Young1
Forum|alt.badge.img+9
  • Brainy
  • 520 replies
  • Answer
  • February 10, 2023

Hey @Mono

Someone asked a similar question in this thread.
The short answer is that you need to pass an empty array to the linked record field.

It should look like this:

table.updateRecordAsync(recordId, { "linked_record_field": [] });

kuovonne
Forum|alt.badge.img+17
  • Brainy
  • 5996 replies
  • February 11, 2023

Your third version was correct. You probably got tripped up in an issue today when scripting was not working and didn't realize that it was a problem with Airtable and not your script. It wasn't reported on Airtable's status page, but multiple users were experiencing issues with previously working scripts today.

table.updateRecordAsync(r, { "Linked Field": []});

 


  • Author
  • New Participant
  • 1 reply
  • February 13, 2023

Thanks All - Sending through the blank array is indeed the answer.

Looks like the issue with Airtable on Friday was stopping it from working.

Thanks!


Reply