How can i export single selection into csv?

Hi,

Any way i can export these items?

I think there’s a way to do this with scripting, but someone else would need to chime in on that.

The only quick way that I can think of would be to make sure that each one of those options is already chosen for at least one record in your table. Then, convert the field to a linked record field, and then go to the new table that is created and export as CSV from there.

You can always revert the linked record field back to single select afterwards, although note that this entire process will update the “last modified time” in all of the records in your table.

You might also be able to do this with On2Air: Schemas. @Hannah_Wiginton would need to chime in on that one.

Scott’s option is probably best to create a record with each option.

On2Air Schemas will show you any options from your select fields but unfortunately, won’t export these options.

1 Like

Hi Kenny, I’ve set something up here with a scripting app that may help

How can i export single selection into csv?

Not a real export, but should get you 90% there probably.

Code:

let settings = input.config({
    title: `Display select field options`,
    description: `Select the table that contains the field, and the field you want to display the options of`,
    items: [
        input.config.table('table', { label: `Table` }),
        input.config.field('field', { parentTable: `table`, label: `Field` }),
    ],
});

let { table, field } = settings;

if(field.type === "singleSelect" || field.type === "multipleSelects"){

    let options = new Array;

    for (let choice of field.options.choices){
        options.push(choice.name)
    }
    output.text(options.toString())
}
else{
    output.text(`Selected field is not a single select or multiple select field`);
}
1 Like

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.