Select to view content in your preferred language

Group Heading Conditional Formatting

521
3
Jump to solution
04-24-2023 12:08 PM
LaurenCammack01
New Contributor III

Is it possible to color code the group heading based off of pass/fail questions within the group? For example, I have to failed questions in a group, I would like the group header to be colored red. If all questions in the group have passed I would like it colored green. 

I'm currently getting an error on my calculate field for the begin group. I am able to color code the heading of the specific question with the calculate field based on pass/fail.

I found this post, however it isn't mentioning anything regarding formatting based on questions within the group other than changing text.

https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-groups-grids-and/b... 

0 Kudos
1 Solution

Accepted Solutions
abureaux
MVP Regular Contributor

What I would do is set this up in stages: 1) Each question gets its own T/F logic, 2) SUM the individual questions, then 3) Use a logical test on that final SUM

In practical terms:

1) In this example, when someone answers "Bad" in one for the four questions, it results in a 1. Otherwise, the result is a 0. 

2) Then, I SUM up all of my questions (four, in this case).

3) Finally, I perform a logical test. For my example here, I am assuming that if they answer "Bad" even once, then the color will be Red, otherwise it will be Green.

abureaux_0-1682368568252.png

abureaux_1-1682368804733.png

 

View solution in original post

0 Kudos
3 Replies
abureaux
MVP Regular Contributor

abureaux_0-1682365546371.png

abureaux_1-1682365592800.png

Also works with HEX colors.

Edit: In case it wasn't clear, you can use any logic you'd like/need. I just used a select_one as an example. The key is simply to replace the colored text (below) with a formula that will dynamically add the HEX/Color code:

abureaux_3-1682365919835.png

 

0 Kudos
LaurenCammack01
New Contributor III

Great! Thank you so much. If I were to have multiple questions under a heading based on the pass/fail would I do a separate calculate field for the heading and then reference the name of the calculate field?

0 Kudos
abureaux
MVP Regular Contributor

What I would do is set this up in stages: 1) Each question gets its own T/F logic, 2) SUM the individual questions, then 3) Use a logical test on that final SUM

In practical terms:

1) In this example, when someone answers "Bad" in one for the four questions, it results in a 1. Otherwise, the result is a 0. 

2) Then, I SUM up all of my questions (four, in this case).

3) Finally, I perform a logical test. For my example here, I am assuming that if they answer "Bad" even once, then the color will be Red, otherwise it will be Green.

abureaux_0-1682368568252.png

abureaux_1-1682368804733.png

 

0 Kudos