Theres an “Expense Tracking” script by @Jeremy_Oglesby that I was able to modify to fit my needs to single select population. Check it out and see if what he has there will fit your needs. It’s over in the “Show and Tell” category I think
I figured it out. I wasn’t setting the options for the SingleSelect object correctly. Here is the correct code
// Create three records in the Vendors and Contacts table
let orders = base.getTable('Order Group Summary');
let table = base.getTable("Detail Page Resources");
/* Pick from a table */
let table2 = base.getTable("Products/Variations");
let product = await input.recordAsync('Pick a product to create new row template', table2);
if (product) {
output.text(`You picked ${product.getCellValueAsString("Short Name")}`);
let recordIds = await table.createRecordsAsync(c
{
fields: {
'Type': { name: 'Primary Image 1' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'Primary Image 2' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'Primary Image 3' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'Primary Image 4' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'Primary Image 5' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'Primary Image 6' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'Primary Image 7' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'Variation Swatch' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'Title' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'Bullet Point 1' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'Bullet Point 2' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'Bullet Point 3' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'Bullet Point 4' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'Bullet Point 5' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'Description' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'EBC Logo' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'EBC Banner' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'EBC Image 1' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'EBC Image 2' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'EBC Image 3' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'EBC Image 4' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'EBC Image 5' },
'Product': :{id: product.id}]
},
},
{
fields: {
'Type': { name: 'EBC Image 6' },
'Product': :{id: product.id}]
},
},
]);
output.text("Created " + recordIds.length + " records!");
}
else {
output.text("You didn't select a record. Please start again.");
}
In case it’s not a single select field, it’s only a number field, how can the field type be established? Because I keep getting the error that “Error: Field “fldvL6Nlx8t0sm9MK” cannot accept the provided value.”