Quotes in Text

It says: To display quotes in a text string, use a backslash ( \ ). For example: `=“This is the “\official” retail price for this item:” & variable name

But I can’t seem to get this to work when trying to create feet/inches marks and not bounded quotes:

=choose(Type,“1’-0”,“2’-0”,“3’-0”,“4’-0”,“5’-0”)

Any ideas?

Is this in regards to a Dynamic Component?

Yes, it is.

OK. I just moved it to the right category so the right people will be along to help.

I think you need to use a work around as the code evaluates the strings in a formula, try referencing attributes (a1,a2,…) with their properties set to text (not just the default grayed out value), then choose(Type, a1,a2,a3…)

measures.skp (20.9 KB)

I know that “/” cannot be used as its evaluated as division when passed to a formula, so use decimal rather than fractions

The workaround I came up with was create a variable “Q” and assigned it the quote ("). Then concatenated it to the feet/inches string.

1 Like

I saw this yesterday. I think it is printed incorrectly.

Backslash escaping always precedes the escaped character.

(As is currently)
For example:
="This is the "\official\" retail price for this item:" & variable name

(Should be:)
For example:
="This is the \"official\" retail price for this item:" & variable name

Meaning that the code wants the word official to be delimited with double quotes in the label, etc.

For some reason, that never worked. It doesn’t seem to work if you only want 1 double quote.
If I copy/paste in:

=choose(DR010_Type,“1’-0"”,“2’-0"”,“3’-0"”,“4’-0"”,“5’-0"”)

it changes the (") to just the double quote - it seems to work the first time, but if you hit Enter again, you get an error.

My workaround works consistently, I just don’t understand the “official” word on this.

We cannot see what you paste in … the forum is replacing with smart quotes.
(Use a code block, or delimit your paste in code with backquotes.)

Sorry - not familiar with the code block


=choose(DR010_Type,“1’-0\"”,“2’-0\"”,“3’-0\"”,“4’-0\"”,“5’-0\"”)

From memory, I think it is replaced with the ampersand html name the first parse, leaving it useless the second.

oh … "

Nope, Skippy changes (") into the double quote character and gives an error.