Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Ampersand in text string causing problems

My dataset has a text variable where some of the strings contain ampersands (&). When using the variable in QV, whether its in list boxes or tables, the ampersand cuts off the string. E.g. "A dog & a cat" returns the shown text " a cat". 

I have tried using text(varname) as [varname] in Edit script, but without any luck..

Thanks in advance..

7 Replies
Anonymous
Not applicable
Author

Bruno

Would using the Replace() function to replace the '&' with the text 'and' be acceptable ?

Best Regards,     Bill

Not applicable
Author

Hi Bill,

Thanks, but unfortunately this is not possible as the '&' has to be replaced with different words in different strings (and, AND, the Danish word for 'and'). I cannot know which exact word, whitout going through all strings in the dataset. 

Best Regards

MayilVahanan

HI

Can you provide a sample?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author


You can replace & with chr(38) in your string and it will solve your problem.

Regards

Nitin

Not applicable
Author

I'm sorry, but I can't make it work here (I tried to replace the '&' using the replace function in QV, but I couldn't - not to any other string or sign ..)

However, I found a solution. In my excel-data I replaced '&' with 'chr(38)'. Then when loading into QV I replaced 'chr(38)' with '&'. Peculiarly that worked.

Anayway, thanks all for answering.

Regards

Bruno


jonathandienst
Partner - Champion III
Partner - Champion III

Bruno

I do not see this behaviour and I would not expect any issues with &. See the attached where I am loading from a spreadsheet column containing cells with &.

Perhaps you should post an example so that we can discover why you are having this issue.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

thanks for this... I tried it using the same qlikview generator and its displaying properly.

something must be wrong with how my file was encoded...

ok, thanks a lot..