Forums

Articles
Create
cancel
Showing results forΒ 
Search instead forΒ 
Did you mean:Β 

if (match(Labels;"*Good*"); "🟩 Good 🟩") - but what if I want the same for when Labels are EMPTY?

Bernard Horowitz
Contributor
March 7, 2023

Hello all,

I am using the following code in a structure formula column

if (match(Labels;"*Good*"); "🟩 Good 🟩")

what I am trying to do is figure out how to do the same kind of thing but for items that do not have anything that matches a certain string and return a different colore box with the word Invalid or even just empty)

if (no match (labels;"*crazy*"); "EMPTY")

I am trying to figure out if there is a way to use no match or !match or even if labes=EMPTY but it won't let me add the graphic or custom text. Thoughts?

Thanks

Bernard

1 answer

1 vote
Nicholas Ellis _ALM Works_
Atlassian Partner
May 10, 2023

Hi Bernard,

There are definitely a few ways to do this.  I would suggest using size() to check if the labels are empty.  Something like this:

if labels.size() = 0 : "EMPTY"

This works because the list of labels is treated as an array.  Here is the documentation for our array functions if you are interested to learn more.  https://wiki.almworks.com/documentation/structure/latest/data-center-and-server/expr-function-reference-172164198.html

Cheers,
Nick [Tempo/ALM Works]

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events