Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,507
Community Members
 
Community Events
184
Community Groups

Structure: IF statement in Formula for Multi-value Components Field

Hello fellow JIRA experts,

Question for you,

I am trying to use an IF statement to return values for the component field:

IF (
Component = "DATA"; "Data Analytics";
Component = "Enhancement"; "Enhancement";
Component = "COMS"; "Communications";
Component = "NETS - OPS"; "Operations";
Component = "C&R"; "Research"
)

This works if the component field only has one value. However it does not return anything if the component field contains DATA and Enhancement. It simply leaves it blank. Any suggestions on how to write an IF statement that can return either the first value or both values in a scenario like this? 

Thanks in advance for your help

Bernard

1 answer

1 accepted

1 vote
Answer accepted
Dionathan Lopes _ALM Works_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Sep 28, 2021

Hello @Bernard Horowitz ,

Thank you for sharing your Structure Formulas question here on the Atlassian Community

Here is an example formula you could use as a template:

 


IF (contains(components, "DATA") = 1; "Data Analytics";
IF (contains(components, "Enhancement") = 1; "Enhancement";
IF (contains(components, "NETS - OPS") = 1; "Operations";
IF (contains(components, "C&R") = 1; "Research";
IF (contains(components, "COMS") = 1; "Communications")))))



Please note that this formula will work only on the latest versions of Structure (V7.0 +). 

Basically, it is checking your components and will return the first value of the list using the name you need to show.

Also, here you can find more information about Formulas and Arrays:  https://wiki.almworks.com/documentation/structure/array-functions-115289495.html

Please let me know if it helps.

Best Regards
Dionathan L
[ALM WORKS] 

That works! Thank you. Now I have to play with it a bit. Fantastic. Thanks for taking the time!

Like # people like this
Dave Rosenlund _Tempo_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 28, 2021

@Bernard Horowitz please "Accept answer" when you are fully satisfied with @Dionathan Lopes _ALM Works_'s response.

In this way, others reading this post will know this is the right solution. :) 

Best,

-dave

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events