Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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
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
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.
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.