I have a Java expression that's I'm using in Talend Open Studio's tMap component, trying to clean up fields that are null, empty and consist of only white spaces
I tried this statement but it hasn't remove the white spaces:
(myTable.myField == null || StringHandling.TRIM(myTable.myField).length() > 0 || myTable.myField.isEmpty()) ? "Not Set" : myTable.myField
The nulls and empty fields are working, but I have a field with just a white space in it and this isn't getting rid of it
I'd like to remove all spaces from , not just leading/trailing
I borrowed the whitespace statement from here: How do I check that a Java String is not all whitespaces?