Mar 03, 2021 09:59 AM
Hi, new to Airtable, so this may be a dumb question; apologies in advance if so.
Is there a way to dynamically update single select field options from an API?
For example, looking to have a list of item types to select for a record, ex: Server, Workstation, Switch
This master list is contained in another system but accessible via rest API. Is there a way so that in the far end system, if “Router” is added as an item option, the Airtable option list for that field will now contain “Server, Workstation, Switch, Router”?
Solved! Go to Solution.
Mar 03, 2021 11:45 AM
Sorry, I thought that you were trying to update a record, but you actually just want to update the list of options itself.
Unfortunately, there is not a direct way to do that at this time — you can only add new options by updating a record.
Similarly, you can’t edit or delete options, either.
Mar 03, 2021 10:39 AM
Welcome to the community, @Jesse_Miller!
You will get an error unless you enable the “typecast” parameter as one of the parameters you send via the API. It would look like this:
"typecast": true
If you enable typecast, then any new options you send to Airtable via the API will be added into the single select field options.
Check out the excellent Airtable API documentation, which gives examples based on your own bases, tables, and fields.
Mar 03, 2021 11:35 AM
Thanks! I’m not sure I’m following. The API help seems to only show me how to write static records. I’m looking to update the selectable list of options for a single select cell, so that someone going in manually and clicking the dropdown list would see the updated options and be able to select them. Sounds like there’s a way to do that from what you are saying; do you have any examples you could point me to for this?
Mar 03, 2021 11:45 AM
Sorry, I thought that you were trying to update a record, but you actually just want to update the list of options itself.
Unfortunately, there is not a direct way to do that at this time — you can only add new options by updating a record.
Similarly, you can’t edit or delete options, either.
Mar 03, 2021 11:46 AM
Darn. I do appreciate the quick reply though; thank you!
Mar 03, 2021 11:47 AM
You’re welcome! Glad I could help! You might want to email support@airtable.com to ask them about upgrading their API in the future to support this feature.