- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Jul 03, 2023 12:19 PM
I've already updated some fields using the Airtable API, but never in a multiple select field. Right now I need to update a multiple select field using Airtable API. For this, I'm implementing the following code in a script action on an automation.
let inputConfig = input.config();
let recordId = inputConfig.recorId;
const update = {
"fields": {
"Testeee": [{name: 'A'}, {name: 'B'}]
}}
let myHeaders = new Headers();
myHeaders.append("Authorization", "I_PUT_MY_VALID_TOKEN_HERE");
myHeaders.append("Content-Type", "application/json");
let response = await fetch(`https://api.airtable.com/v0/{baseid}/{tableid}/${recordId}`, {method: 'PATCH', headers: myHeaders, body: JSON.stringify(update)});
let res = await response.json();
console.log(res);
type: "INVALID_VALUE_FOR_COLUMN"
message: "Cannot parse value for field Testeee"
Solved! Go to Solution.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Jul 03, 2023 04:42 PM - edited ‎Jul 03, 2023 04:43 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Jul 03, 2023 04:42 PM - edited ‎Jul 03, 2023 04:43 PM
I think the multi-select is just an array
"fields": {
"Testeee": ['A','B']
}
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Jul 04, 2023 09:27 AM
You are right. It's just an array!!
Thank you very much! I tried to find this information on the Airtable API documentation, but I failed. Do you know where I can find this kind of information whenever I need it?
