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.
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.
Hi Kenny, I’ve set something up here with a scripting app that may help
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`);
}
Hi Kenny, I’ve set something up here with a scripting app that may help
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`);
}
Thank you Adam @TheTimeSavingCo This saved me a load of time. I made a slight mod for myself that may be helpful for others if you want to copy/paste into a spreadsheet to use later.
// User selects table
let Table = await input.tableAsync('Pick a table');
let FieldOptions = Table.fields;
//loop through all the fields in the table
for (let I in FieldOptions){
let ThisField = FieldOptions[I];
// check if the field is a single or multiselect
if(ThisField.type === "singleSelect" || ThisField.type === "multipleSelects"){
// create new array and push all the options for the current field to the array
let options = new Array;
for (let choice of ThisField.options.choices){
options.push(choice.name)
}
// Join the array and out put with the name of the field.
let Output = options.join(`;\n`);
output.text(ThisField.name + `;\n` + Output);
}
}