Wednesday, 14 December 2011

An empty field is not nothing!

[Formate]  When checking an equality in Formate, a mapped input field with no text is not nothing, but a series of spaces equal to the lenght of the field, so checking to see if @Field = "" will never be true. If the input data field is 5 characters in lenght an empty field is actually equal to "     ". To resolve this you need to apply a trim, either the the field in its properties or in code and all is ok as the trim removes empty spaces, so trim(@Field) ="" can be true. (PCA)