Creating a table by importing excel with single select options

Topic Labels: Importing-Exporting
916 1
Showing results for 
Search instead for 
Did you mean: 
6 - Interface Innovator
6 - Interface Innovator

I'd like to create a new table by importing from an excel worksheet. There will be 30+ fields and i want the single select options to be True and False.

When i've tried to add the single select options manually as answers and then convert the field to be single select, it reverses the order. on my survey, i do not want the answers to be False and True, but True and False. 

Is there a way to do this without going through and manually changing every single field to single select and re-ordering the options for each one? 


1 Reply 1
12 - Earth
12 - Earth


Set table in line 1 and if you need any singleSelect field to skip, put it's name in line 2

I suppose there are 2 options only, without 'empty option', otherwise it will fail to change field options

const selects=base.getTable('Table1').fields.filter(x=>x.type==='singleSelect')
const toChange=selects.filter(x=>!['Exclude example','place fieldnames','to skip'].includes(
const swap=arr=>({choices:[arr[1],arr[0]]})
const setTF=async f=>await f.updateOptionsAsync(swap(f.options.choices))
let ask=await input.buttonsAsync('To Change: '>,['Yes','No'])
if (ask=='Yes') for (let fld of toChange) await setTF(fld)