Four Stars

tFilterRow and Boolean values

Hello, 

 

I am trying to use tFilterRow to exclude rows where a Boolean column (isName) is False.  The GUI does not seem to support Boolean relational so I am attempting to use the Advanced mode.  I have tried the following lines in the Advanced editor without success:

 

input_row.isName.compareTo(true)

input_row.isName == true

input_row.isName.equals(true)

 

While testing the issue, i noticed that using:

 

Relational.ISNULL(input_row.isName)? true:input_row.isName.equals(true)

 

Gives me half the output I want (I get the filter output (value is true) but not the reject output (value is false))

What am I doing wrong here?

 

Thank you in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Seven Stars

Re: tFilterRow and Boolean values

@EMeany - I just tried to re-pro your use case like below and was able to filter out records. Let me know if this is what you are trying to achieve.

Job Layout - 

tFilterRow-1.JPG

 

I have two fields as input (isName is defined as bool). Configured tFilterRow like below - 

tFilterRow-2.JPG

 

And as you could see the output below the rows are filtered accordingly - 

tFilterRow-3.JPG

 

2 REPLIES
Seven Stars

Re: tFilterRow and Boolean values

@EMeany - I just tried to re-pro your use case like below and was able to filter out records. Let me know if this is what you are trying to achieve.

Job Layout - 

tFilterRow-1.JPG

 

I have two fields as input (isName is defined as bool). Configured tFilterRow like below - 

tFilterRow-2.JPG

 

And as you could see the output below the rows are filtered accordingly - 

tFilterRow-3.JPG

 

Four Stars

Re: tFilterRow and Boolean values

@iamabhishek

 

Thank you for your reply.  For my particular use case I was not able to use the method you suggested (due to a null pointer error). However, I was able to reproduce your job results and have confirmed that tFilterRow works as you suggest.

 

Thank you again for your help.

E