Help

Re: Test for empty, but not empty if zero

954 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Ben_Lillie
5 - Automation Enthusiast
5 - Automation Enthusiast

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 Replies 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'
        )
    )
Ben_Lillie
5 - Automation Enthusiast
5 - Automation Enthusiast

Ah, that works, thank you!