Structure Formula Column - Only Show Specified Labels

Don Utley June 24, 2022

I want to only show certain labels (labels that start with "ABEA") in a structure formula column. So it'd look like these: 

Labels - Filtered Labels

"ABEA_12345, Software, West" - "ABEA_12345"

"ABEA_12345" - "ABEA_12345"

"Software, West" - NULL

 

I thought FILTER is what I need: 

FILTER

FILTER(A, $)

Filters the values in an array and produces a new array that retains only elements for which the user function $ returns a true value (considered as a Boolean).

 

and used: FILTER(labels, "ABEA*") 

but I'm just getting "VALUE!" as a result. 

 

 

EDIT: 

might be one step closer. Tried this: 

label.FILTER( $ = "ABEA*" )

and got blanks. But then I tried a specific value to see if it's the wildcard:

label.FILTER( $ = "ABEA_12345" )

and this worked, but just for ABEA_12345. So it's the wildcard that's messing this up. 

2 answers

1 accepted

4 votes
Answer accepted
Don Utley June 24, 2022

Figured it out using regex and MATCH function. 

label.FILTER( MATCH( $ ,"/^ABEA*/" ) )

David Niro
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 24, 2022

that's it!  looks like I needed a page refresh before posting ;)

Like # people like this
1 vote
David Niro
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 24, 2022

Hello @Don Utley ,

David from ALM Works here.

Since we are trying to match the labels' value to "ABEA", we just need to add the MATCH expression.  The formula below should return the values you are looking for:

labels.FILTER($.MATCH("ABEA*"))

Please let me know if it helps!

Best,
David

Suggest an answer

Log in or Sign up to answer