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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
JM39
Creator
Creator

tMap not recognising value - please help!

Hello all. I desparately need help with this issue as it's driving me mad!

In my tMap I have this

row5.Code.equals("GB") ?

row2.Postal_Code :

row2.State 

To get the row5.Code I'm using a csv lookup which uses the state field in the input file to derive the country code. And it correctly derives it. My input file is also csv. So for a name field I want to use the postcode if the country is GB, else use the state field. But it doesn't seem to recognise any of the derived GB values & puts the state in the name for every one of them.

I've attached some screenshots of my job and tMap. Thanks in advance!

Labels (2)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

@JulieM39 JulieM39​ , the below expression will work.

row5.Code.equals("GB") ?

row2.Postal_Code :

row2.State 

 

but you can write this to avoid null pointer exception by writing the below way.

 

 

("GB").Code.equals(row5.Code) ?

row2.Postal_Code :

row2.State 

 

 

with the above expression if your not getting expected result may be the joining fields from row5 to row2 is not matching. you need to check the join criteria and data what you are getting.

 

Thanks,

Manohar

 

 

 

 

 

 

 

 

 

 

View solution in original post

1 Reply
manodwhb
Champion II
Champion II

@JulieM39 JulieM39​ , the below expression will work.

row5.Code.equals("GB") ?

row2.Postal_Code :

row2.State 

 

but you can write this to avoid null pointer exception by writing the below way.

 

 

("GB").Code.equals(row5.Code) ?

row2.Postal_Code :

row2.State 

 

 

with the above expression if your not getting expected result may be the joining fields from row5 to row2 is not matching. you need to check the join criteria and data what you are getting.

 

Thanks,

Manohar