Select to view content in your preferred language

485
3
04-24-2023 12:08 PM
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.

1 Solution

Accepted Solutions
by
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.

3 Replies
by
MVP Regular Contributor

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:

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?

by
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.