Help

Re: API Get only the options of field(column) type multiple select (array of string)

349 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Edgar_Calderon
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello everybody!!!
I’m new in the comunity of Airtable, since last Monday, Im working with the API, now I need some help, this is the think:
I have a table with a field of type multiple select(array of string) and need to get only all the options (values) configured of this field, not the values select by the user.
please help, some real values are:
[
“Planning”,
“Work-in-progress”,
“Approved”,
“Completed”,
“1. Fields Status Value Text”,
“Otro”,
“Testing1”
]
and are all this values that I need get to my code.

See you…

5 Replies 5
Andrew_Johnson1
8 - Airtable Astronomer
8 - Airtable Astronomer

To the best of my knowledge the API currently does not have a way to retrieve the configured values of a multiple select field.

Daniel_Assayag2
4 - Data Explorer
4 - Data Explorer

what about 2020?

any update on that topic?

Welcome to the Airtable community!

The public REST API does not have this information, but it is available in the Scripting API and the Custom Blocks API.

dzulstellar
4 - Data Explorer
4 - Data Explorer

what about 2023?

willups97
4 - Data Explorer
4 - Data Explorer

It seems like you still can't do this using the API.

However, you can flatten the multiselect options from all of your records down into a Set (which automatically discards duplicate values) and then use Array.from() to turn it back into an array.

 

return Array.from(
   new Set(
      this.data.flatMap(record => record.fields['Tags'])
   )
);