Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

using a variable with "quotation marks" inside.

Hi,

I would like to use a field in a Tex Box.

I set the Tex Box as     ='$(=[MyField])'

It works only when the content of MyField doesn't have quotation marks inside.

example:

" John Paul Jones " works

" John 'Paul' Jones " doesen't work (Error: Garbage after expression:"......)

How can I do?

thank you very much!

1 Solution

Accepted Solutions
simenkg
Specialist
Specialist

You can simply use =[MyField] or better yet =Only([MyField])

View solution in original post

8 Replies
tresesco
MVP
MVP

Remove single quotes around dollar expansion like:

=$(=[MyField])

Not applicable
Author

Try this in yourpic12.png

alexandros17
Partner - Champion III
Partner - Champion III

Ciao,

in realtà non è un comportamento normale, potresti allegare un esempio?

Grazie e ciao

Alessandro

simenkg
Specialist
Specialist

You can simply use =[MyField] or better yet =Only([MyField])

Not applicable
Author

It doesn't work, it gives me an error on ","

Not applicable
Author

Ok but I can't do that, the text that I have to write is in a field in a database (and it changes when I change the selection), so I have to use the name of the field (MyField in the example)

Not applicable
Author

OMG It works

so can you kindly tell me the difference between using =[MyField] or  =Only([MyField])?

simenkg
Specialist
Specialist

On the surface there is no difference. Calling a Field without an aggregate function around implies the use of Only. I just prefer doing things explicit in stead of implicit.

There is however one more reason to use Only and that is that you can use a very powerful tool called set analysis. As you have posted this in New to QlikView, you might not have gotten to that stage yet, but it is well worth learning.