Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
JustinDallas
Specialist III
Specialist III

Fine in text box, garbage when in expression

Hello Everyone,

So I've got a piece of title creation logic that appears quite a bit in my application

=IF( SubStringCount( GetFieldSelections(TerritoryDistrict ,'|'), 'ALL'),'North America',

  IF( SubStringCount( GetFieldSelections(TerritoryDistrict ,'|'), 'NOT District 7') , 'US',

  IF( SubStringCount( GetFieldSelections(TerritoryDistrict ,'|'), 'NOT Agricultural|District 7') , 'US Less Ag',

  GetFieldSelections(TerritoryDistrict ,','))

  ))

When I put this into a Text Object as the text, it evaluates fine.  However, when I put this expression into a variable, and then tell a text box to show that, I get "Garbage after expression: "Less"".  What am I doing wrong where it isn't getting parsed correctly in my TextObject?  I've attached an image of the offending characters.

QlikTextIssue.PNG

QlikTextIssue2.PNG

Any help on this matter is greatly appreciated.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

That's something weird about dollar expanding variables that return strings. If you try =vTerritoryReadable you should get a result.


talk is cheap, supply exceeds demand

View solution in original post

1 Reply
Gysbert_Wassenaar

That's something weird about dollar expanding variables that return strings. If you try =vTerritoryReadable you should get a result.


talk is cheap, supply exceeds demand