Dynamic group background color

07-11-2019 02:34 AM
Status: Open
Esri Contributor

Add a background color variable for groups. This variable could be dynamic, allowing you to change the background color of a group based on a response

For example, a survey on the compliance of building permits.
- If the group dedicated to the limits is in conformity then its background color becomes green
- If the group dedicated to buildings is non-compliant then its background color becomes red

Today, we can only use dynamic labels to get a quick overview of a group. The background color would improve the visibility of the answer

Tags (1)
1 Comment

It's been awhile since this got suggested but I haven't seen anyone address this so here goes:

You can accomplish this functionality using the backgroundColor property in the body::esri:style column of the group and a calculate field. First create a calculate field that handles the logic you need and returns the appropriate color value i.e. a field named background_calculated with the calculate field equal to:  if(${record_type}="valid", "blue","red"). Then set the backgroundColor property in the body::esri:style column of the group equal to that field: backgroundColor=${background_calculated}. That gives you a dynamic background for the whole group.

For whatever reason it doesn't seem to work if you put the logic directly in the body::esri:style column which is why you need a separate calculate field.