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

How do I filter out rows where a column contains a quote symbol (")

Hi folks,

 

I'm trying to set up a filter in tMap input that removes rows where a string column contains a quote symbol in the string (").  And also removes rows where the email is blank.

 

My attempt at this expression looks like this:

row1.UMB_Student_Email != null && !row1.Permanent_Street.contains("\"")

But I keep getting an error that says "Exception in thread "main" java.lang.Error: Unresolved compilation problems:"

 

And I can't tell where I'm going wrong.

 

Can you help?

Labels (2)
1 Solution

Accepted Solutions
dasari16
Contributor II
Contributor II

The source value may be a blank instead of null. tweak your statement like below and should work.

!("").equals(row1.UMB_Student_Email) && !row1.Permanent_Street.contains("\"")

Thanks & Regards

Naveen

View solution in original post

3 Replies
dasari16
Contributor II
Contributor II

The source value may be a blank instead of null. tweak your statement like below and should work.

!("").equals(row1.UMB_Student_Email) && !row1.Permanent_Street.contains("\"")

Thanks & Regards

Naveen

Anonymous
Not applicable
Author

My apologies it took so long to test and reply.

 

I tried the code and still get the error.

 

I agree that the email should have been checked as a string, but I think the Permanent_Street (address field) is the culprit, where I'm trying to check whether the string in that field contains a quote (") in the string itself.

 

I'm not confident my code that is checking for the quote (") is right but I cant find what is the right combination no matter how hard I google.

Anonymous
Not applicable
Author

Actually.. I'm sorry Naveen.  The code seems to work when I add test variables, but without the variables it still produces the error in the test window. And the red box error at the end of the expression scroll-bar is always there. I'm not sure whats going on, but I'm rolling with it.