Using quotation marks in formula

Hi community!

I have found this thread that covers my issue but is now locked

Unfortunately the different solutions in there don’t seem to work in my formula.

We have a specific text column (Pitch) in a table (1Release add) that I need to make sure don’t have any quotation marks in it. I want to build an inline warning note on the page. My inline formula goes like this:

If(
[1Release add].Pitch.Contains(‘\”’) OR
[1Release add].Pitch.Contains(‘"’),
“WARNING: QUOTATION MARKS IN PITCH”,
“ALL OK”
)

(note that I have an \ in the third row too, but the Community editor removes it)

However even if there are quotation marks in the Pitch column, the formula doesn’t “trigger” and still displays ALL OK.

There are two different quotations marks in the fomula since Mac & PC user don’t use the same…

"

Any insights on how to make this one work? Thanks!

hi @Jonas_Faugere , it has been a while :wink:

did you try containsText() ?

When I want to be precise, I prefer Regex, with the help of AI it is not too difficult anymore.

Christiaan

2 Likes

Hello @Jonas_Faugere

The issue is that the Contains() formula only works with a list of values. As @Christiaan_Huizer suggested, you’ll need to use the ContainsText() or RegexMatch() formulas to achieve your desired result.

Regarding the difference in quotation marks, it seems the second one () is not an ASCII character. I don’t use Mac, but I believe that on Mac, the difference is purely visual, as the ASCII code (34) remains the same. To be sure, you can use multiple ContainsText() calls combined with the OR operator, like this:

Pitch.ContainsText('"') or Pitch.ContainsText('”')

1 Like

Hey @Christiaan_Huizer , @Felipe_Arnhold

Thank you both for your help! And of course, using ContainsText() works like a charm. Not sure why I haven’t tried it before posting.

Also for reference, using single quotes like below does work for the formula to detect the quotation marks.

(‘"’)

1 Like

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