Forum Discussion
MCFNeil
8 years agoQrew Captain
Try to use the IsNull function rather than the <>"".
If(IsNull([Contract Down Time]),
If the field properties for the duration field have "treat blank values as '0' in calculations" it will cause your <>"" to have the value of 0, so its not ever blank.
If(IsNull([Contract Down Time]),
If the field properties for the duration field have "treat blank values as '0' in calculations" it will cause your <>"" to have the value of 0, so its not ever blank.
- AndreonnaGarret8 years agoQrew Assistant CaptainThis helped partially. I had to uncheck the "treat blanks as 0" on my duration field. Unchecking that seems to have worked.
The problem now is that if it's blank the status works, but if my employees filling the report out put a zero in there (which they do all the time) it doesn't work.
Any suggestions? - MCFNeil8 years agoQrew CaptainIf([Contract Down Time]<=0, ....
Or do they put 0 and you want that to be true if they put 0? - AndreonnaGarret8 years agoQrew Assistant CaptainThis is what I originally tried. I couldn't do that because the status field is text and the [Contract Down Time] field is a duration.
- MichaelBarrow8 years agoQrew CadetIf you want to catch both a null and a blank, for any field type, my experience is that it's best to use the Length function (in conjunction with ToText for non-text fields).
If( Length(ToText([Non-textField])) = 0, <it's null or blank>, <it's not null or blank> )
It really irritates me that QB decided to make the IsNull function not work right with text fields. That makes no sense to me, but the Length work-around does the trick.