Re: Adding new element to multiselect field

1037 1
Showing results for 
Search instead for 
Did you mean: 
4 - Data Explorer
4 - Data Explorer

I want to add a new element to my multiselect field. For example, multiselect field is teams and it already has team A, team B, etc. but 'team C' is never inserted. It's a new value for the field.

I am doing this: (in python)

at = airtable.Airtable(settings.AIRTABLE_BASE, api_key=settings.TOKEN)
at.update(str(settings.TABLE), str(rec_id), dataset)

airtable.airtable.AirtableError: Insufficient permissions to create new select option ""team C""

I'm using admin account. How do I proceed?
3 Replies 3
Airtable Employee
Airtable Employee

Hey there! Based on the error message returned, one possibility is that the typecast parameter is not enabled in your request. When creating or updating records, if the choice string does not exactly match an existing option, the request will fail. If typecast is enabled, a new choice will be created if one does not exactly match. We'd recommend visiting the API documentation under "Create records" for an example of including the typecast parameter in your request body.


As a quick note: the python package is maintained and run by the community where it follows our API methods, so while we cannot give definite guarantees on errors, it might be that the syntax is slightly different than in our API. The typecast parameter should be set to a boolean value of either "true" or "false," so depending on how you are currently passing in the parameters, you can just add the additional typecast parameter and set it equal to true.

I am using this line to update: at.update(str(settings.TABLE), str(rec_id), dataset)

dataset is a dictionary with names of fields and values, how do i add typecast parameter?

Airtable Employee
Airtable Employee

We aren't able to provide guidance on unofficial API clients, though I would encourage you to explore the other unofficial Python client, pyairtable. It is well maintained and also has dedicated documentation that can help with questions like this (e.g. examples using typecast can be found here). Hoping this can help!