Test for empty, but not empty if zero


#1

Hi! I have a duration field that is sometimes filled out and sometimes not. I’d like to test to see if it’s empty. The problem is that for the meaning of the field, zero is different from empty. Currently if I do something like:

IF( Duration )
or
If ( Duration = BLANK() )

it returns false for both the field being empty or it being zero. Is there a way to tell the difference in a formula?


#2

Actually, there is: Rather than test {Duration}, test {Duration}&'' — like so:

IF(
    {Duration}&''='',
    'Duration field is empty',
    IF(
        {Duration}&''='0',
        'Duration field contains 0:00',
        'Duration field has non-zero value'
        )
    )

#3

Ah, that works, thank you!