Skip to main content

Node API: Multiselect new option

  • Mar 14, 2019 9:28 PM UTC
  • 15 replies
  • 292 views

Forum|alt.badge.img

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 ?

This topic has been closed for replies.

15 replies

Forum|alt.badge.img+4

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.


  • New Participant
  • May 4, 2019 12:43 AM UTC

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?


Forum|alt.badge.img+7
  • New Participant
  • May 6, 2019 10:28 PM UTC

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.


Forum|alt.badge.img+4

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?


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?


  • New Participant
  • May 28, 2019 1:16 AM UTC

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.


Forum|alt.badge.img+4

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.


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


  • Participating Frequently
  • Feb 18, 2021 3:05 PM UTC

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
}

Bill_French
Forum|alt.badge.img+19
  • Inspiring
  • Feb 18, 2021 3:17 PM UTC

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?


  • Participating Frequently
  • Feb 18, 2021 3:56 PM UTC

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!


Bill_French
Forum|alt.badge.img+19
  • Inspiring
  • Feb 18, 2021 3:58 PM UTC

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.


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!


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!!


  • Participating Frequently
  • Oct 11, 2021 2:31 PM UTC

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!


  • New Participant
  • Aug 19, 2022 7:18 PM UTC

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.


Forum|alt.badge.img+2
  • New Participant
  • Dec 10, 2022 10:52 PM UTC

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

Insufficient permissions to create new select option