How to escape double quotes and other characters in formulas?

I am trying to generate text containing double quotes in a formula field.

I found out I can escape double quotes with a backslash "", but in the result not only the double quotes, but also the backslash is shown.

Like so:

With the formula being "\"" & {String} & "\""

I would expect The output to be

“Test”

Is there a reference on how to escape special characters in formulas in SeaTable? I haven’t found it anywhere.

Hi @Ingmar !
You can simply use simple quotes to encapsulate the double quotes you want to see in your formula’s result :
'"' & {String} & '"' gives the expected output.

It’s not really a proper escaping solution, but it works in your case.
Bests,
Benjamin

Thanks @bennhatton for your response. Let me add this:

image

Every text output in a formula column must be either encapsuled with double quotes or single quote. In this way you can always output the other type of quote without ending your expression.

  • to return "Test" you have to us '"Test"'
  • to return 'Test' you have to us "'Test'"

Easy right. If you want to output " and ' at the same time, you have to concatenate two strings with & and change the enclosing quotes. (like in the screenshot)

Last hint: the only special char that is not supported, is the backslash \. This can never be returned by a formula column and will always result in an error.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.