Find empty label field in Structure Formula

Jeff Thielman May 5, 2023

Hi -

I am trying to add a formula column in Structure to show if a label field is empty.

 

Currently, I am using this formula, but the case for nothing being selected isn't working. I have tried undefined, "", and "None".

CASE (profile;
undefined; "Profile: Not specified";
"TBD"; "Profile: TBD"
)

profile is a custom label field.

If I set value to TBD, I get the expected response. If the field is empty, I get no response.

Thanks.

1 answer

1 accepted

1 vote
Answer accepted
David Niro
Atlassian Partner
May 8, 2023

Hi @Jeff Thielman ,

I don't believe that undefined is a value CASE() can check against.  You can use a default value with CASE().  So, for example:

CASE (profile;
"TBD"; "Profile: TBD";
"Profile: Not specified"
)

This will make the return value "Profile:  Not specified" if none of the other conditions are met.  I will point out that this will be true if there is some label used that is not part of your list of conditions.  

If this does not work, you may try using an IF() Conditional statement in addition to CASE().  Something like:

IF profile = undefined:
"Profile: Not specified"
ELSE:
CASE (profile;
"TBD"; "Profile: TBD"
)

Please let me know if this helps!

Best,
David

Jeff Thielman May 8, 2023

Thanks @David Niro 

This makes sense. I went with the 2nd option, as I have dozens of other label options. It works perfectly. 

 

Thanks for the advice.
Jeff

Like # people like this
David Niro
Atlassian Partner
May 8, 2023

You are very welcome!

Like Dave Rosenlund _Trundl_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events