In QGIS I've set up some project variables called rv_farbe1
, rv_farbe2
and so on. The contain color values in html notation like '#ff0080'
.
Now in rule base labels I would like to setup data defined override by selecting the text color based on an attribute value sektor_lfd_nr
. The idea is to concatenate a string @rv_farbe
and the sektor_lfd_nr
and evaluate the result in order to access the variable value like
eval('@rv_farbe' || "sektor_lfd_nr")
As far as I understand, in expression editor preview I should get the color value, but preview (german: 'Ausgabevoransicht') displays nothing:
Furthermore, the text with data defined override set for it's color does not display.
Both using the variable directly (@rv_farbe1
) as well as using the html style color code directly ('#ff00bb'
) works, so do I miss something about eval()
statement, or what might be wrong here?