Help

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

1603 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Joe_Cool
6 - Interface Innovator
6 - Interface Innovator

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:
airtable_record.png

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 5
Tuur
10 - Mercury
10 - Mercury

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.

Tuur
10 - Mercury
10 - Mercury

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

@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"
	}
}
Joe_Cool
6 - Interface Innovator
6 - Interface Innovator

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 .

Tixu_Tixu
4 - Data Explorer
4 - Data Explorer

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.