Help

Re: Automation Add Option to "Multiple Select" Field that might be empty or filled

2528 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Marcus_Lee
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello. I have a Status field which is “Multiple Select”. I am trying to build an automation that automatically adds “new” to the Status field when a new record is created. However, the Status field may start empty or it may start filled with other options from the “Multiple Select”.

I can make an automation that works when the field starts empty (just assign “new”), but this will erase any other options if the field starts filled. If the field starts filled, I can assign “new”,{Status}, but this gives an error when Status starts empty ({Status},“new” also does not work). The error is ‘Failed to construct the value for “Fields”.’ So I cannot account for both at the same time. However, my table will have both cases for new records. Am I missing something about how to concatenate the already selected options with my new option?

The work around I have found is to use an additional formula field that either fills “new” or concatenates "new, " to a non-empty field. However I would rather not have this extra field and this seems simple enough that I’m hoping that I am just missing something. Please let me know if you know how to fix this. Thank you!

15 Replies 15

Welcome to the community, @Marcus_Lee!

You shouldn’t be getting an error message when trying to update an empty multiple select field. That should work just fine.

However, you DID stumble upon one of the current limitations of Airtable’s automations: it doesn’t APPEND options to a multiple select field, but rather it completely OVERWRITES your multiple select field.

The workaround to this problem is also what you’ve discovered: if you create a formula field that results in values separated by commas, you can set your multiple select field to that formula, and Airtable will interpret that as different multiple select values.

To simply APPEND options at this point in time, you would need to either write your own custom JavaScript, or turn to an external automation platform like Integromat (which is my personal favorite no-code automation platform).

Correction: If you insert the original value from the trigger record, add a comma, and then type whatever is supposed to be appended, Airtable Automations does in fact append multiselect field values. If you’re updating a record which isn’t the trigger record you could pull the original multiselect options using whatever script was used to get that record’s ID into the Update Record step using an output variable.

Ooh, this is a hot tip! I did not know this!! I never even tried that!!

Thanks so much, @Kamille_Parks!! :grinning_face_with_big_eyes: :raised_hands: :star2:

@Marcus_Lee, do what @Kamille_Parks said! :stuck_out_tongue_closed_eyes:

Thanks for the suggestions, @Kamille_Parks and @ScottWorld ! @Kamille_Parks, your suggestion seems to work if I have some entries in the Multiple Select Field already. But if the Multiple Select Field starts of empty, then using the field value with a comma and the new text fails. Is there something that might work for the empty field and filled field at the same time? Thanks!

There are a couple solutions including: use a Script Action before the Update Record action to do some error catching, or using two different Automations (one for when the field is empty, one where the field is filled).

Alternatively, you could always go back to your original solution, which is the extra formula field. You can always hide the Formula field so you don’t need to see it.

Marcus_Lee
5 - Automation Enthusiast
5 - Automation Enthusiast

Thanks both for your help! I will try some of these suggestions. @ScottWorld and @Kamille_Parks

Richard_Mitchel
4 - Data Explorer
4 - Data Explorer

Hi there!

I’m not sure if you’re still looking, but I found what I think is a better solution to this problem. (I’ve been frustrated by it myself for a while!)

When setting up your automation, find the multiple select field you want to append the new option to. In my example, this is just a generic “Tags” field. Click the little blue plus and choose the record that triggered your automation. Find the same multiple select field and select “Continue.”

Now find “Make a new list of…” and select “<>id”. Then just type in a comma and whatever item you want appended (or multiple items separated by commas, presumably). Now, whenever the automation triggers, it will duplicate the existing selected options and add your new option as well! No need for an extra formula field or anything :slightly_smiling_face:

See attached screenshot if more clarity is needed.airtable-howto

EDIT: One caveat I just discovered is that this will add an empty option AND your appended option if the field is empty to begin with.

The replies above you explain this process and the fact that it doesn’t work for currently empty fields.

I must have misread the replies, as I felt the process I outlined was a different process. The OP said a similar process “fails.” The process I outlined doesn’t fail, it just also happens to append an empty value.

You didn’t misread. At the time of this topic’s posting the Automation would indeed fail regardless of whether “list of name” or “list of id” was used. In the interim, this has been “fixed” for both so that the Automation can complete but adds an empty select option.

Assuming people don’t want a phantom select option, the answer is still “use a Script Action or use two Automations”

Ah… that makes sense.

And here I thought I had found something.

Thanks!

The change in Automation behavior wasn’t documented, to my knowledge, so I’d say count this as a win for pointing it out.

Has anyone been able to determine a way to remove the empty option that is produced here?

I have gotten my automation to work at pulling in the status for “AFF Status (test)” based on the “AFF Status (auto)” formula field, but it creates an empty option. The funny thing is that it only creates an empty option for the Acquired and Converted statuses and I believe it is because of the comma. I tried changing the delimiter but then the automation doesn’t work. So I think I just need to find a way to remove the empty option.

!Any help is appreciated!

image

Nadav_Ben_Gal
5 - Automation Enthusiast
5 - Automation Enthusiast

For those (like me) who are looking for a solution for this problem, just letting you know that now it's not a problem with the (relatively) new feature of "advanced logic". You can add an "IF" statement, that checks if the field to be updated is empty or not. If it is not empty you can use the option from above. If it is empty just proceed as usual