Skip to main content

Does anyone know if it's possible via process builder, or flow, to add values from a multi-select picklist field without clearing out the previously selected values?

 

For example, if multi-select picklist field has values of A, B, and C and when I create a record i select value A.  Then once the record is saved, based on other criteria, that same field updates and adds value B.  So now the filed has values A and B entered.

 

I initially tried this through process builder and when the record is updated, it clears out the previously selected value.  I want that to stay, but can't figure it out.

 

Thoughts?

5 Kommentare
  1. 5. Juni 2020, 14:44

    I came here looking for a solution to this problem and found Deanne's post super helpful! Honestly, I think it's pretty genius. At the same time, I'm kind of new to Salesforce, so it took me a bit to work through Deanne's explanation. I'm going to add some comments that make it more clear to me, in the hope that they help others.

    If you go this route, you are going to end up with a gigantic formula. That's ok, but when you see her big list of IF statements, keep in mind that they are ALL part of one formula for a 6-option multi-select picklist.

    Deanne's formula uses lots of IF and INCLUDES, which I had to look up more. The INCLUDES statement determines if a certain value of a multi-select picklist is already selected and returns TRUE if it is. For each option, she has an IF statement that takes the value returned from the INCLUDES statement (TRUE or FALSE) and then determines if it should mark that option or not - if the IF is true, it does. When used together like she did, it says, "check what value this already has, and put it back".

    The longer IF statements between the ones to decide whether to include a specific value are there to add a semicolon, which is needed in order to mark multiple values in the picklist. That means that you need to check if ANY value after is filled, and then add an ";" if it is.

    The last thing is that you will need one IF statement for each value, and then one long IF statement for each ";" between values. This means that you will end up with one less than twice the values you have. Her example had 6 values, so there are 11 big IF statements.

    In my org, I was looking at a picklist with 13 values, which would end up as 25 IF statements, with those ";" ones getting REALLY long! Luckily, I am doing something new that I think can be check boxes instead. It won't look as pretty on the page, but it's just for the primary admin (currently me!), which means that any who follow will be happy to not maintain that LOOOONG formula.

0/9000