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

issue with string compare in tMap

Hi,
Not sure is there something wrong with the expression
(StringHandling.LEFT(row1.text1,3)=="PNL" ?(row1.text1):" not matching")
here is the data from the file

QU HDQPNSY
.HDQRMSY 242150
PNL
SY0341/25MAR MSP PART3
-MCO121Y-PAD006
1HECKT/ALEXANDER-AM4 .R/CTCT MSP612 338 8880 A
.R/CTCH MSP763 545 9319 H .L/NWZAEA
1HECKT/CATHERINE-AM4
1HECKT/OLIVIA-AM4
and I am getting "not matching for all the rows"
Thanks,
Labels (2)
2 Replies
Anonymous
Not applicable
Author

Hello,
With java : do not use == to compare String.
you should use the equals methode like this :

(StringHandling.LEFT(row1.text1,3).equals("PNL")?(row1.text1):" not matching")
Anonymous
Not applicable
Author

Thanks a lot emenuet, now its working as expected !