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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tMap Expression writing syntax, filter in tMap

Hi All,

 

From below CSV file I have to pull the data related to Country England in one output file and in another CSV file without Country England. How to write 2 expressions. 

 

I have written like this : row1.Country.equals("England") , row1.Country!=England

But it's throwing an error Type Mismatch: Cannot convert from boolean to String

LastName;Gender;Age;Salary;Country
Buren;M;73;14500;England
Adams;M;40;30000;England
Jefferson;F;66;56000;USA
Adams;M;9;28800;England
Jefferson;M;30;46000;China
Carter;F;26;45000;England
Harrison;M;40;45788;UAE
Roosevelt;F;15;56000;England
Monroe;M;8;5000;England
Arthur;M;20;36777;USA
Pierce;M;18;100000;England
Quincy;F;83;49888;UAE
McKinley;M;70;39000;England
Coolidge;M;4;56000;India
Monroe;M;60;24000;England

 

Thanks in advance for your help

Regards

Guru

Labels (9)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

 

You are giving the condition expression in wrong area.

0683p000009M8FM.png

Please refer below help link to understand how to write expressions inside tMap.

https://help.talend.com/reader/u8p7D8I8mmr4JVdAEYllMA/FOi3TpyD9Vio1IWKCsfG~w

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

View solution in original post

6 Replies
Anonymous
Not applicable
Author

change
row1.Country!=England
to
!row1.Country.equals("England")

Regards
Shong
Anonymous
Not applicable
Author

Hi Shong,

 

Still throwing same error. Type Mismatch: Cannot convert from boolean to String

Anonymous
Not applicable
Author

where do you write the expression? Can you upload a screenshot of tMap?
TRF
Champion II
Champion II

Use tFilterRow to exclude "England" rows.
You can also add an expression filter within a tMap input flow (tMap left side). In this case use the following syntax:
!"England".equals(row1.country)
Anonymous
Not applicable
Author

Hi,

 

Please have the screen shots to understand the problem.

 

Regards

Guru


Error.docx
Anonymous
Not applicable
Author

Hi,

 

You are giving the condition expression in wrong area.

0683p000009M8FM.png

Please refer below help link to understand how to write expressions inside tMap.

https://help.talend.com/reader/u8p7D8I8mmr4JVdAEYllMA/FOi3TpyD9Vio1IWKCsfG~w

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved