Text with quotation marks in the string inside of if-statement

hi,
how can i use text with quotation marks inside of an if-statement?
my simplified case: IF(Item = “string”, 1, 0)
my string looks sth like this: ‘product “type” extension’
but it doesnt recognise the strings if they contain ", which the entry im trying to work with does.
‘string’ doesnt work either

Welcome to the community, @Daniel_Hoechstetter!

Unfortunately, one of the big problems with Airtable formulas is that they choke on “curly” quotes of ‘any’ kind.

What makes this frustrating is that it isn’t documented anywhere on Airtable’s support site, and also it would likely be so easy for the engineering team to simply change this behavior in the product.

So, until this behavior is changed, you will have to be continually vigilant about always making sure that your formulas only contain "straight" 'quotes'.

Hope this helps! If this answers your question, could you please mark this comment as the solution to your question? This will help other people who have a similar question. :slight_smile:

unfortunately this doesnt resolve my problem. i have tried every possible combination of " and ’ and even tried to copy/paste the straight quotation marks from the above answer.
inside of airtable, it seems, that quotation marks do not get converted to curly quotes automatically. this only happend here in the forum when typing my question

Oh, you’re trying to search for a LITERAL quotation mark in your field value? Then, you would escape the LITERAL quotation mark by putting a backslash before it. You would still need to wrap the search string in its own set of quotes, but then put a backslash before any LITERAL quotes that you’re looking for.

thank you so much for your help, but this still doesnt work. actually i have searched this forum quite a lot before writing my own thread and i have tried all your solutions before that :frowning:
one clarification on my topic: the questioned string is inside an if-statement, which is inside a formula, which im trying to deploy to a field type

Sorry, I don’t understand your questions of what you’re trying to do. Perhaps reach out to support@airtable.com to see if they can guide you. Post back here with the answer!

To clarify it further with a picture :slight_smile:


no matter what combination of quotes i use (and also escape character), it doesnt recognize any string with quotes INSIDE of the string

Your formula is actually fine.

But here’s the problem… your formula is referencing a linked record field, which can never really be done successfully in Airtable. There are lots of strange things (bugs?) in Airtable regarding formulas referencing linked record fields in Airtable, but the strange thing that you’ve stumbled upon today is if your linked record field has any quotation marks in it, Airtable ends up substituting 3 quotes for each single quote. But even after knowing about that, it’s useless knowledge, because as far as I know, you still can’t reference it in a formula field. Airtable is filled with weird inconsistencies like this, so this is not the only part of the product that makes little sense. Part of the “joy” of working in Airtable is trying to workaround issues like this. :crazy_face::man_shrugging:t2:

Your solution is to create a lookup field. Create a lookup field (based on the existing linked record field), and pull in the item name into the lookup field. Then, your formula above should be changed to reference the lookup field instead of the linked record field, and that will give you the results you’re looking for.

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