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,297,053
Community Members
 
Community Events
165
Community Groups

Structure Formula - display colored value of a Variable

Hi, 

i am calculating a value, that is saved in my variable "diff". 

I want to show the value of the variable in structure with a colored background. I tried a lot, but instead of the value i only get the Name of my variable. 

Here is a Part of my Formula: 

--------------

with diff = X/Y:

IF diff < 0.5:
//$diff{backgroundColor=red color=white}
":panel[diff]{backgroundColor=red color=white}"
//FORMAT_CAPTION("RED", ":cloud_with_lightning_and_rain:" diff)
ELSE IF diff ...

-------------

In the picture you can see some Results. Instead of "diff" i want to se something like "1,54"...

The "Format_Caption" is a copy-paste from the helping sites - which did not help.

image.png

1 answer

1 accepted

3 votes
Answer accepted

Hello @Uwe Döll ,

David from ALM Works here.  Welcome to the Community!

Your formula is 99% of the way there.  There are two adjustments we can make to get it working for you.

The first is to define diff as an expression using $ and to enclose the Text Snippet with """.

With those two modifications, your formula should look like this:

with diff = X/Y:

IF diff < 0.5:

""":panel[$diff]{backgroundColor=red color=white}"""

Please let me know if this helps!

Best Regards,
David

Good morning David, 

Thanks for your help. It works exactly how i want it to :-)

Best Regards, 

Uwe

image.png

Like # people like this

You are very welcome, @Uwe Döll !  So glad to hear it was the right solution for you!

Best,
David

Like Dave Rosenlund _Tempo_ likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you