Help

INVALID_VALUE ... array of record IDs

Topic Labels: API
Solved
Jump to Solution
6131 1
cancel
Showing results for 
Search instead for 
Did you mean: 
brian_Ford
4 - Data Explorer
4 - Data Explorer

I am trying to update a column that is linked to another record. None of the other fields in the base are linked to another record, and all of those will update. I get an error only when I add the field that is linked to another record. I am using Shortcuts on iOS.

This is the error I get: {“error”:{“type”:“INVALID_VALUE_FOR_COLUMN”,“message”:“Value is not an array of record IDs.”}}

I have zero experience with APIs, but truly appreciate any help!

1 Solution

Accepted Solutions

If you haven’t already, checkout the documentation at https://airtable.com/api . And if you’re able to post a screenshot or code snippet of what is actually making the call to the Airtable API that will help us provide more specific answers.

In order to update a linked field, you need to already know the record IDs of the records to which you want to create a relationship. So if you want to update a product record to be related to two Vendors, you would need to first fetch the two Vendor records and get their IDs. Then you can build your patch request payload so that it looks something like this:

{
  "fields": {
    "Name": "This is the new name",
    "Other Field": "This is some other field",
    "Vendor": [
      "recrnsKSwhPp9WAao",
      "recsSVeVF54yLRwC9"
    ]
  }
}

This patch request would REPLACE whatever links the Vendor field had with links to the two specified vendors.

See Solution in Thread

1 Reply 1

If you haven’t already, checkout the documentation at https://airtable.com/api . And if you’re able to post a screenshot or code snippet of what is actually making the call to the Airtable API that will help us provide more specific answers.

In order to update a linked field, you need to already know the record IDs of the records to which you want to create a relationship. So if you want to update a product record to be related to two Vendors, you would need to first fetch the two Vendor records and get their IDs. Then you can build your patch request payload so that it looks something like this:

{
  "fields": {
    "Name": "This is the new name",
    "Other Field": "This is some other field",
    "Vendor": [
      "recrnsKSwhPp9WAao",
      "recsSVeVF54yLRwC9"
    ]
  }
}

This patch request would REPLACE whatever links the Vendor field had with links to the two specified vendors.