Help

Re: Node API: Multiselect new option

5784 2
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?