Help

Copy all oprtions from a sinlge select and paste it in a new text column

Topic Labels: Data Views
134 1
cancel
Showing results for 
Search instead for 
Did you mean: 
jpghelfi
4 - Data Explorer
4 - Data Explorer

Can someone help me figuring out how I can copy all the options in a single select (my example has 5 options, but assume a have a sigle select with 1000 options), and paste it in another table, as a regular text field? i need this because I want to create a db with all those options, and use link record.. as this info is in many of my forms, and get updated regularly , thanks!

jpghelfi_0-1715115456485.png

 

1 Reply 1

Try using a scripting block to output all the options:
Screenshot 2024-05-08 at 9.45.09 AM.png

I broke it out into new lines so you should be able to copy that and paste it into your table and it should be one record per line

let table = base.getTable("Table 1")
let field = table.getField("Type")

let options = ''

field.options.choices.forEach(x => {
    options += x.name + '\n'
})

output.text(options)