Help

Automatically execute script from the scripting extension

Topic Labels: Automations Extensions
409 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Alexy_Creusot
4 - Data Explorer
4 - Data Explorer

Hello, 

I have been trying to update a single select type field. I am using this example script from the official documentation :

 

const table = base.getTable("Suivi des profils 🙋‍");
const field = table.getField("Client ");

await field.updateOptionsAsync({
    choices: [
        ...field.options.choices,
        {name: 'My new choice'},
    ],
});

 

This script works using the scripting extension.

I wanted to use this in automations, but of course, updateOptionsAsync() is only available for the scripting extension. The problem is that I need to watch for newly created records in another table and use a specific field value from this created record to add to the single select field.

Is there a way to update a single select field using automations ?

Or is there a way to automate a script from the scripting extension ?

To summarize I need to do this :

New record created -> Get a field's value (name) -> Add to options of single select field


1 Reply 1

Automation scripts cannot update field options. But I believe the Update Record action has the ability to add an option choice when you update a select field with a new value. 

On the other hand, if you need to frequently add choices, you might want to consider using a linked record field instead of a select field.