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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.