Help

Re: Extracting dropdown menu items and formatting them for export

Solved
Jump to Solution
3924 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Anxious
7 - App Architect
7 - App Architect

Notice: I am on a free plan and do not have access to any paid tools by Airtable or another company.

I am trying to export airtable data in a csv. The place I am importing to cannot recognize “drop down” menu options.

I need to extract about 100 dropdown menu options* and format them thusly in a “text” field

["value1", "value2"]

*When I mention options I am talking about all the options in the dropdown menu, not just the ones selected and displayed.

I don’t know if this is possible, but if anyone knows a workaround that would be awesome. It would save me the hassle of having to type them all out with that formatting. :dizzy_face:

Airtable Account: Free Plan
Records: 1,200/1,200 1000/1000 (I might have to find a different solution soon)
Automation Runs: ??/100
Extensions: 1/1 (TinyPNG Compression Script, looking for free alternatives)
1 Solution

Accepted Solutions
Vivid-Squid
11 - Venus
11 - Venus

Hi @Anxious
If you add the scripting app (this is available in the free plan) to the right side panel. Open it up from scratch and remove all of the default scripts. then add this script

let table = base.getTable("Table")
let multipleSelectField = table.getField('Dropdown');
for (let choice of multipleSelectField.options.choices){
output.markdown(`
${choice.name}
`)
}

Change the Table and Dropdown parts in my script to match the names of your table and dropdown. Then run it. It will output all the options in text.

image

See Solution in Thread

3 Replies 3
Vivid-Squid
11 - Venus
11 - Venus

Hi @Anxious
If you add the scripting app (this is available in the free plan) to the right side panel. Open it up from scratch and remove all of the default scripts. then add this script

let table = base.getTable("Table")
let multipleSelectField = table.getField('Dropdown');
for (let choice of multipleSelectField.options.choices){
output.markdown(`
${choice.name}
`)
}

Change the Table and Dropdown parts in my script to match the names of your table and dropdown. Then run it. It will output all the options in text.

image

That code was fantastic, thank you! I was able to grab all available choices and format them.

On another note, how do you get the choices that are currently in the fields to be formatted like this: “Choice”, “Choice2”.

I duplicated the multichoice field and converted it to text.
Result:

Choice1, Choice2, Choice3

Now I am looking for a formula field to format the output text.

“Choice1”, “Choice2”, “Choice3”

I have hundreds and hundreds of rows, so doing this by hand is not an option. :dizzy_face:

Importing and exporting between platforms is a NIGHTMARE. XD

Airtable Account: Free Plan
Records: 1,200/1,200 1000/1000 (I might have to find a different solution soon)
Automation Runs: ??/100
Extensions: 1/1 (TinyPNG Compression Script, looking for free alternatives)

Hi @Anxious
You should be able to take that into a text editing program to format it the way you want.

or you can try something like this

let table = base.getTable("Episodes")
let multipleSelectField = table.getField('Status');
let array = []
for (let choice of multipleSelectField.options.choices){
    array.push(choice.name)
}
output.markdown(`${array}`)