Page 1 of 1

Formula Editor Escape Character

Posted: Fri Feb 19, 2021 1:28 pm
by dutil
Hello,

Is there an escape character that can be used to insert special characters within a string value in the formula editor?
We have some automation that writes formulas to different fields but we could not find how to escape certain characters, specifically quotation marks.

E.g.
We would like to have something like:
Value = "This is a test string with special "quotes" inside."

However, the "quotes" substring causes a syntax error. We have tried using the typical escape characters/sequences to escape such as backslash \, and triple-quotes.

As a stop-gap, we ended up going with a clunky solution using the Pad() function so now our formula strings look like this:
Value = "This is a test string with special " + Pad("", '"', 1) + "quotes" + Pad("", '"', 1) + "inside."

I could not find any related threads/documentation.

Any feedback is greatly appreciated.

Thank you in advance!

Re: Formula Editor Escape Character

Posted: Wed Feb 24, 2021 11:19 am
by BobRichards
You can put them inside a string that is surrounded by single quotes.

Code: Select all

value = 'This is a test string with special "quotes" inside.'