Comapre 6 variables to find the highest and display the end screen based on that. | Community
Skip to main content
Question

Comapre 6 variables to find the highest and display the end screen based on that.


I have created a Typeform:

It has 6 question group with 6 question in each, so a total of 36 questions.

All the questions have 4 options with a score attached to them: Never [score - 0], Rarely [1], Occasionally [2], and Frequently [3].

I have created 6 variables to store score of each question group. say name V1, V2, V3, V4, V5, V6.

There are 6 end screens.

At the end I want to check, in which question group the user scored the highest, or we can say which variable have the highest score, and display the end screen accordingly.

The simplest approach would be to check, if v1>v2 and v1>v3 and v1>v4 and v1>v5 and v1>v6 , then display end screen 1 (say e1)

Similarly, if v2>v1 and v2>v3 and v2>v4 and v2>v5 and v2>v6 , then display end screen 2 (say e2).

But this is not possible to achieve on Typeform. I have read multiple community threads but they didn’t helped. Somewhere a logic was mentioned c1=v2-v1>0 then v2 is greater, but again there is no place to implement this.
 

4 replies

john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5306 replies
  • June 28, 2024

@sameergautam - it’s not fun to do but you CAN do it in the logic rules.. it’s a whole bunch of them.. and then you have to figure out how to deal with tied scores - do you want a simple tiebreaker or one to choose from each possible tie??

des


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 15014 replies
  • July 12, 2024

Hi @sameergautam I hope you’re doing well! Were you able to get this setup? Let us know if you still need help!


  • Author
  • Explorer
  • 1 reply
  • July 12, 2024

Hi @Liz , yes I figured it out with the help of ChatGPT, it took 108 if-else conditions to display the end screen. It would be much simpler if Typeform had the feature to compare variables.


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 15014 replies
  • July 15, 2024

😯 Oh wow @sameergautam Did you end up configuring all of those conditions? 


Reply