Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Missing something easy with this conditional

Hi All,

 

In tMap I have the following expression:

StringHandling.TRIM(row2.country) == "Germany"?"EMEA":"UNKNOWN"

But for some reason all the values, regardless of the value of "row2.country" are all coming up as "UNKNOWN" including the ones that have a value of "Germany".

I have checked the incoming data and it is correct (initialized just like in the equation).

I am sure I am missing something simple but it is escaping me.

Thanks.

Labels (3)
1 Solution

Accepted Solutions
nivedhitha
Creator III
Creator III

@Craigbert ,

 

Please try changing the condition to

StringHandling.TRIM(row2.country).equals("Germany")?"EMEA":"UNKNOWN"

 

and see if it works.

For strings, it is usually done this way 

View solution in original post

3 Replies
nivedhitha
Creator III
Creator III

@Craigbert ,

 

Please try changing the condition to

StringHandling.TRIM(row2.country).equals("Germany")?"EMEA":"UNKNOWN"

 

and see if it works.

For strings, it is usually done this way 

Anonymous
Not applicable
Author

String value comparison should be done with .equals() method and not == operator. Double equals is for object reference comparison
Anonymous
Not applicable
Author

Thanks to you both!  That solved my problem!