Filter by multiple column (String) values in tmap

Five Stars

Filter by multiple column (String) values in tmap

How can I filter by used two string column values as i need to filter on different values only?

 

for example :

I am using this filter in tmap

(row4.pivot_value.equals(row6.pivot_value))? false:true 

 

after that i am using tfilter to get true values

 

but it gives an error NullPointerException

 

is there any possible way?


Accepted Solutions
Highlighted
Five Stars

Re: Filter by multiple column (String) values in tmap

Hi,

 

this solution will fit with as some times the other columns won't be null. I have figured out a solution but creating a variale in the tmap with this code:

 

(String.valueOf(row5.pivot_value).equals(String.valueOf(row3.new_staus))) ? "0" : "1" 

 

no erros appear and after that I used filter to get the data with "1" only. it works will with me


All Replies
Forteen Stars TRF
Forteen Stars

Re: Filter by multiple column (String) values in tmap

Hi,
Did you try this:
(row4.pivot_value != null && row6.pivot_value != null && row4.pivot_value.equals(row6.pivot_value))? false:true

This is your responsability to decide how to consider null values. Here, the result will be false only when both fiels are not null and equal to each other. Else the result will be false.

TRF
Highlighted
Five Stars

Re: Filter by multiple column (String) values in tmap

Hi,

 

this solution will fit with as some times the other columns won't be null. I have figured out a solution but creating a variale in the tmap with this code:

 

(String.valueOf(row5.pivot_value).equals(String.valueOf(row3.new_staus))) ? "0" : "1" 

 

no erros appear and after that I used filter to get the data with "1" only. it works will with me