Help

Re: How do you change the specific single select option and colour of a record with automation

1340 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Naca_Hitchman
5 - Automation Enthusiast
5 - Automation Enthusiast

I need to change a single select record based on a separate date record. The single select has multiple options with the same name but different colours, so how I can using automation specify which option to select as well as which colour
image

As can be seen in the image Confirmed has blue, orange and pink. With automation I need to select a specific Confirmed colour based on the date. I don’t know how to do this.

3 Replies 3

Hi @Naca_Hitchman,

You’d have to get all the options of the single select field, get the id of the specific option you want to use, and update the record like so:

await table.updateRecordAsync(recordId, {
    "Single Select Field": {id: [SELECT FIELD OPTION ID]},
})

To get the options, I did:

const table = base.getTable("Table 1")
const selectField = table.getField('Single Select Field');

console.log(selectField.options)

Im unable to add scripts to automation, do you need an upgraded account for it?

Hi Naca, yeah you need a Pro or Enterprise account to run scripts in an automation.

I think I may have a workaround though. I believe the Scripts block should be accessible on all plans including Free.

What you can do is install the script block, get the id of the single select option you want to use, and just paste that id into your automation like so:

Screenshot

And that should work!