Mar 11, 2020 10:27 AM
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…
Mar 12, 2020 05:04 AM
To the best of my knowledge the API currently does not have a way to retrieve the configured values of a multiple select field.
Nov 02, 2020 10:17 AM
what about 2020?
any update on that topic?
Nov 02, 2020 06:26 PM
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.
Feb 02, 2023 07:42 PM
what about 2023?
Oct 07, 2024 05:56 PM - edited Oct 07, 2024 05:56 PM
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'])
)
);