Help

Discover what data silos are costing your org in our commissioned Forrester study. Learn more

Adding an option to a "multiple select" field when a new record created Script

Topic Labels: Scripting extentions
352 5
cancel
Showing results for 
Search instead for 
Did you mean: 

Hey everyone:)

Looking for a Script that adds an option to a “multiple select” when a new record is created in a near by Table.

It’s a base that works as an app for Sending Whatsapp messages.
there is a “multiple select” field that needs to be connected to another table with costumer names and phone numbers. so that when a new record is created the costumer name would pop as an option in the multiple select field.

Any ideas ?

5 Replies 5

You could do this with scripting, but I would personally recommend using Link Records fields as that’s exactly what this field type is for.

If your WhatsApp integration requires you to use a MultiSelect field and isn’t compatible with a Link Records field, you can have an Automation copy the Link Records field into the MultiSelect field. Or as I said use a script to add select options to the field when new customers are added.

Thank you Kamille,
I am familiar with the link to record, and do use it in many cases.
But i like this field to have colors so it would be more user friendly.

Thank you:)

I would argue that using a multiple-select field like this would definitely not make it long-term-maintenance-friendly. I’m all for making things user-friendly, but if it negatively impacts the developer experience—like I feel it would in this case—I would seriously question if it’s really worth it. In this case I’d see the use of color as more of a “it might be mildly helpful/interesting”-type feature and not necessarily something that will clearly improve the user experience.

If color is important, you can introduce color by adding colorful emoji to the primary field value. It isn’t the same as multiple-select coloring, but many people find it to be a good balance between wanting both color and the power of a linked record.

You can even have the automation add the emoji to the primary field value, although you will need a a technique to pick a different emoji for each record, such as a script or a formula.

Also note that automation scripts cannot create new multiple-select choices, although the “update record” action can.

i see.
Thank you for sharing the knowledge. if there is no script option for adding a choice than i will stop looking for one.

I think there is a workaround for that,
when i create a new record with an option that do not exist it will add it as an option.
so theres one way.
just not so elegant.