Help

Re: Node API: Multiselect new option

3487 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Uros_Karic
4 - Data Explorer
4 - Data Explorer

I have a need to insert new select option into field but when i try to do it with node api i get.

Class {
  error: 'INVALID_MULTIPLE_CHOICE_OPTIONS',
  message: 'Insufficient permissions to create new select options',
  statusCode: 422 }

I have admin permissions. Is there a way to insert array of new options into Multi select field ?

15 Replies 15
Chinara_James
6 - Interface Innovator
6 - Interface Innovator

Hi Uros, I see this is your first post so welcome.
The API does not currently support creation of tables and fields.
These will have to be set up via the UI interface and the API is for retrieving and updating the information that is already there.

Also as a side note any questions related to API you can put in the API category of the forum.

Javier_Piedra
5 - Automation Enthusiast
5 - Automation Enthusiast

Chinara,

How is it possible that, when creating a new record with Zapier, the creation of a new option in a single select is done?

Matt_Langston
5 - Automation Enthusiast
5 - Automation Enthusiast

We have this need as well. We have an automated process to sync records to Airtable from our database via the API. We have to track down the new value when an error occurs during a sync then have to manually add it to the multi-select field. It would be super nice if it could be done via the API automatically instead.

Edit: It’s also made worse by the fact that the error message is generic, thus we don’t know the offending column either.

Ok, I thought the original person was asking to create a new multiselect field but you want to add options to an existing multiselect field. Theoretically I think this should be possible by supplying the array of options via the API but I have not tested this myself.

Also in what way are you adding the option? During the create record operation or update record operation?

I’m trying during the create record. I want to add a new option to an existing single select field. It throws an error but somehow this can be done with zapier.

Ok I have tested your use case and you can’t add the option on either the create or update methods. I have never used Zapier integrations with airtable but perhaps they have a relationship with Airtable that allows them to do this. You will probably have to reach out to the Airtable team to ask what’s up.

A possible workaround, I don’t know you how your database is designed, is to have the options in a separate table and link that record. That way you can use the create and update methods on that table.

For example think about a users table and roles table. A user can have roles of Admin, Editor, Subscriber. These can be store in a separate table.

Michael_MacPher
4 - Data Explorer
4 - Data Explorer

Was there ever a solution for this? Running into the same issue. Thanks

Erin_OHern
6 - Interface Innovator
6 - Interface Innovator

Hi all,

You can create new select options via the API with a record creation call by including the typecast parameter in your request body. Reference our API Documentation for more information on this parameter and how to include it. Here’s an example request body for creating a record with new options in a multi-select field:

{
"fields": {
    "Multiple Select Field Name": [
        "new select option",
        "another new option"
    ]
},
"typecast": true
}

Does this also work in Script Blocks?

Hi @Bill.French ,

Not currently – the solution above is only for the public API. There isn’t a way to add new select field options in scripting right now, but I will definitely add your vote for this functionality!

Please change my vote to suggest what we really need - increased consistency between the API and SDKs. If it’s possible in the API, users assume it must certainly be possible in the SDK. No one imagines that external apps can do this but internal apps cannot.

I have already used public api with “typecast”: true properties but still facing issue you can follow given message.
Error:
"“message”: “Invalid request: parameter validation failed. Check your request data.”

Pls let me know what I am missing

Thanks In Advance!!

Hi @Shivam_Tripathi,

There are a few reasons why this error can occur - can you please write an email to support@airtable.com with more details of the API request you are making (e.g. the full request, excluding your API key) so that our team can take a closer look? We’ll be happy to help out. Thank you!

popo
4 - Data Explorer
4 - Data Explorer

Can someone show me how to do this step-by-step?

I have no coding experience, but need to figure out a way to allow Make/Integromat to make a new select option when creating a record. How can I bypass the “Insufficient permissions to select new option” error code I keep getting?

I don’t know how to properly use the code solution Erin provided.

Casey_Martell
5 - Automation Enthusiast
5 - Automation Enthusiast

@Erin_OHern I'm seeing the same permissions error as the OP when using the proposed solution.

Insufficient permissions to create new select option