2

I have a workflow rule field update action that concatenates two fields with a dot separating the two values:

Style_Number__r.Name + "." + Color__r.Name

The field value for Color__r.Name can have several special characters...i.e. &, \,  ,   \  , -

I wanted to use the Substitute function to replace those characters with an underscore _ character.

So, if I have the value 1000.This&Is\A Crazy \ Color-Name it would be converted to: 1000.This_Is_A_Crazy_Color_Name

Is that possible using the Substitute function in a workflow action formula?

I was trying with one character: Style_Number__r.Name + "." + SUBSTITUTE(Color__r.Name, "\", "_")

Is it possible to substitute multiple characters in a workflow action formula?

1 Answer 1

3

Call SUBSTITUTE on the result of the first SUBSTITUTE. You're essentially chaining them, until you return a final string.

Style_Number__r.Name  + "."  +  SUBSTITUTE(SUBSTITUTE(Color__r.Name, "\", "_"), "&", "_")

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .