Show Image based on a calculated numeric value

Hi all

I want to show an image based on a calculated value.

calculate a score for a user based on inputs fields. The inputs fields can be filled in by several users to evaluate the user assigned to the current page content.

Example:

Feedback User 1
InputA = 8
Input B= 7
Input C= 10

Total Score from User 1 = 25

Feedback User 2
Input A = 5
Input B= 5
Input C= 10

Total Score from User 2 = 20

Average Score from all user = 22,5

This Average Score is saved on the user.

Now in a repeating group I want to show an Image to represent the average score.

Example

Average score
1-10: Image A
11 -20: Image B
21 … Image C

Can someone help me here?

Do I need to create a Thing for the average score + Images ?

Thank you very much

C

Make all three images not visible on load then:

Put a constraint on image A -> “if input A’s value is >0 and <10 this image is visible”
Put a constraint on image B -> “if input B’s value is >10 and <21 this image is visible”
Put a constraint on image C -> “if input C’s value is >21 this image is visible”

Make sure you have the input types set as “integer” which will allow you to tie math to the input (I.e. what you’ll need to work the contraints with “>” “<”)

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.