MIM WAL: Adding double quote within a string

I want to create a displayName with the WAL. The end state of the display name is

The goal of “Gary Brown” is to play “Baseball”

“Gary Brown” is derived from the display name of the Target user and “Baseball” is from an attribute on the Target user called PreferredSport. It has to appear exactly as above, with the double quotes and all. We know that double quote ” is used to create strings so the question is how do we escape it?

Solution

Escape a quote by making it a double, so for “John”, it would be “”John””. It can also be “”””+”John”+””””. If you just want to show just a quote then make use 4 quotes “”””. So to get our desired end state the string formula would be

“The goal of”+””””+[//Target/DisplayName]+””””+”is to play”+””””+[//Target/PreferredSport]+””””