Filters again

Another one from me:

I have fixed length file with records where sometimes $Name field is empty (" " ← spaces)
when trying to filter with expression $Name=“dpavlis” ( :slight_smile: ) i get an error:
Exception in thread “FILTER_0” java.lang.NullPointerException
at org.jetel.interpreter.InterpreterRuntimeException.getMessage(Interpre
terRuntimeException.java:71)
at org.jetel.component.ExtFilter.run(ExtFilter.java:178)

when using trim($Name)==“dpavlis”
it’s OK

any suggestions ???

nop, i’ve double checked my expression
i allways use ==
it looks like it has something to do with the empty (some number of spaces) value.
the expression works fine with the fields that has no empty record values (sort of not null fields)

Hello !

I am not sure - could it be that you are using “=” token instead of “==” which is comparison operator ?
I admit that the syntax error reporting in filtering expressions is not the best you can have :wink:

Well, I will investigate it anyway.

David.