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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] tMap filter expression syntax doesn't seem to work as advertised

According to everything I've read (Help, examples etc), the below syntax for an output filter in tMap should work:



But it doesn't seem to, at least for me. In fact, if I change the condition to != then all rows with Security_Category=="OS" are routed to this output. 

However, this syntax works perfectly:



which is fine, I can now get it working properly. But does anyone know why the first version doesn't work? Am I doing something wrong, or is there some configuration I can look a that will give me some clues? 

Thanks. 

(talend version: 
)

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

This is a Java thing and is about equality. Basically when you use == you are checking to see if the objects are the same. Do they share the same memory? A real life example would be of two identical cars. They may look exactly same, may cost the same, may have the internal components, but they are not the same car. Car1==Car2 is False. But if you use the equals() method (or a variant of that) you are checking to see whether the contents of the object are the same. Or, using the car example, whether the cars are the same make, model and colour. Whether they "look" the same.
This is explained better in the link below....
http://www.programmerinterview.com/index.php/java-questions/java-whats-the-difference-between-equals...

View solution in original post

3 Replies
Anonymous
Not applicable
Author

...neither does the "click and paste your screenshot", it would seem. Oh well. 

Not working filter syntax is 
row1.Security_category=="OS"

Working syntax is 
"OS".equalsIgnoreCase(row1.Security_category)

Version of Open Studio is 6.3.1

ta. 
Anonymous
Not applicable
Author

This is a Java thing and is about equality. Basically when you use == you are checking to see if the objects are the same. Do they share the same memory? A real life example would be of two identical cars. They may look exactly same, may cost the same, may have the internal components, but they are not the same car. Car1==Car2 is False. But if you use the equals() method (or a variant of that) you are checking to see whether the contents of the object are the same. Or, using the car example, whether the cars are the same make, model and colour. Whether they "look" the same.
This is explained better in the link below....
http://www.programmerinterview.com/index.php/java-questions/java-whats-the-difference-between-equals...
Anonymous
Not applicable
Author

Thanks, that explains it for me.