Skip to main content

[SOLVED] POST and PATCH error: linked columns with multiple values

  • August 19, 2016
  • 5 replies
  • 26 views

Forum|alt.badge.img+2

Is there a way to create a new record and enter a RECORD ID inside of a linked column? I’d like to reference the ID of other tables in my new entry, but am getting this error:

According to AirTable’s documentation: “Airtable API performs automatic data conversion from string values if typecast parameter is passed in. Automatic conversion is disabled by default to ensure data integrity, but it may be helpful for integrating with 3rd party data sources.” Will enabling this feature solve the problem?

5 replies

Forum|alt.badge.img+19
  • Inspiring
  • 366 replies
  • August 20, 2016

I’m pretty sure you have to put 'm in an array (put brackets around it). :slightly_smiling_face:

If you open the API and have a look at the table with a record in it, what does it look like?

Best, Arthur.

PS: not sure what the error is trying to tell us here though.


Forum|alt.badge.img+19
  • Inspiring
  • 366 replies
  • August 20, 2016

Oh, and not sure about typecast. It might work here…


Forum|alt.badge.img+18
  • Inspiring
  • 140 replies
  • August 20, 2016

@Tuur is correct.

For the most part, ANY field that CAN contain multiple values will return an array and require an array to POST/PATCH a record.

So when creating or updating a Multiple Select, Link to Another Record, or Attachment field you must send an array. This can be counter intuitive because even when you’ve unchecked, “Allow Linking to Multiple Records”, you must still pass an array to create or update a Linked field.

{
	"fields": {
		"upcoming_event": ["xxxxxxx"],
		"person": ["xxxxxxx"],
		"status": "not contacted"
	}
}

Forum|alt.badge.img+2
  • Author
  • Known Participant
  • 16 replies
  • August 20, 2016

You guys hit the nail on the head, it was the formatting of the array as @Chester_McLaughlin 's code above shows. I would like to read up more on use-case examples that do use typecast. Thanks for all the help @Tuur and @Chester_McLaughlin .


  • New Participant
  • 1 reply
  • June 11, 2021

You just need to call the id that airtable api generates. If you do this air table will select the corresponding field but through the api you must allways use the api’s ids.