Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm trying to set the background color for an expression based on a field value.
For my example table with just one row everything works fine, if there is a second row the background colour isn't set any more.
Ex.:
Fieldvalue T1_RGB: RGB(254,232,200)
Expression for background color: =$(=only(T1_RGB))
Anyone an idea?
Regards
Thomas
are you want to change the colour of field value..?if this
then add expresion in text colour.
might be helpful you
Hi,
No, i don't want to change the text color, but the color of the background.
But I think the problem is the same also for the text color.
Trying to evaluate field values as expressions like you're trying is a pita. Try adding just the r,g,b values to your table instead of the expression and simply use rgb(r,g,b) as expression for the background color.
[T2_COLOR]:
LOAD * Inline [
T2_RGB,r,g,b
"RGB(254,232,200)",254,232,200
"RGB(253,187,132)",253,187,132
];
Separate r,g,b values are working fine. Thanks.
But why isn't it a good idea to put either "RGB(254,232,200)" or "(254,232,200)" as value in a table and use it indirect? Would it be at least possible to evaluate an expressin indirect, or isn't it working at all?
Hi,
You can store the information as a color.
You can also use some aggregation functions (when it makes sense).
Please see attached
Hope it helps
Regards