Structure Formula - display colored value of a Variable

Uwe Döll June 23, 2022

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
David Niro
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 23, 2022

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

Uwe Döll June 23, 2022

Good morning David, 

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

Best Regards, 

Uwe

image.png

Like # people like this
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

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

Best,
David

Like Dave Rosenlund likes this

Suggest an answer

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

Atlassian Community Events