Comparing scores of five custom variables and sending user to ending page that had highest score | Community
Skip to main content
Answered

Comparing scores of five custom variables and sending user to ending page that had highest score


Hello everyone,

I’ve been reading through about five threads and wasn’t able to find my answer yet. Please excuse me if I just didn’t get it. 

Here is my question: I got a quiz (10 questions) that allows people to find out what blocks them in their career right now (five possible blocks, five different ending pages).

Based on the answers they pick (multiple selections possible per question), each block collects points. I managed to do that with creating five custom variables and for each question setting  the number that should be assigned to each customer variable if this answer is picked.

I also created the five different ending pages.

Here is where I’m stuck: How do I see the final number score for each of my custom variables? And how do I compare these scores? And then send the user to the ending page that got the highest score?

 

Is this the comment I need? 

I don’t fully understand this and where exactly I implement that in typeform.

 

Appreciate your help!

 

If it turns out that my quiz logic is too complicated for typeform, I’ll consider reworking the logic.

Best answer by ChrisR1705

This is SO complicated! - I have seen 12+ different threads now, all with almost the same question about logic and variables, etc. 

Perhaps Typeform should look at ways of making it simpler for the user if almost everyone has the same question and it only works If x is greater than y but smaller than R and always when Q2 has a variable rate of 53 and equal to Q7

View original

18 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14904 replies
  • August 24, 2023

Hi @yoga.mimose Thanks for stopping by the community! 

To show answers or scores at the end of the form, you can use our recall feature to show the scores in those variables. 

Though, we don’t have a way to compare variables, so you would need to use a solution similar to the one @john.desborough posted in order to send the respondent to the corresponding ending screen. 

 


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5272 replies
  • August 24, 2023

@yoga.mimose - there are a fair number of posts related to that in the last couple of months - including one where i posted screen shots of the logic rules that were created for the highest of 5. 

here is what you need to consider building in the logic rules and i will just use A B C D E to stand for the subtotal variables

  • if A greater than B and A greater than C and A greater than D and A greater than E then go to ending A (as is the unique highest score) 
    • repeat for each of the other 4

Are you going to have a tie breaker question if there are ties at high score for each possible pair, triplet etc that are tied: 

  • if A = B and A is greater than C and A greater than D and A greater than E to q_tiebreaker for AB tied high score 
    • repeat for all the other pairs.. ie AC AD AE BC BD BE CD CE DE
    • then do the same for triplets ie A=B=C and greater than D and greater than E

 

here’s a simple sample that uses a series of questions to get you input 5 numbers to proxy the category scores and goes to a single simple tiebreaker. I use this as a base template for a whole bunch of quizzes where i simply replace all the questions with the ones that i need to use for the specifics of the quiz categories (and assign the points to the variables i use for the existing subtotal calculations) 

 

des

 


  • Author
  • Explorer
  • 3 replies
  • August 25, 2023

Thanks for both of your answers! I understand the calculation logic @john.desborough 

The thing I still don’t understand: How do I put this into typeform? Which feature in the tool do I need for that?

@Liz I managed to find the recall function. Worst case, people need to find their highest score on their own


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14904 replies
  • August 25, 2023

Hi @yoga.mimose glad you found the recall feature!

As for the suggestions Des made, you’ll want to use our logic jumps feature for this. This article gives a great overview on how to get started!


  • Explorer
  • 4 replies
  • Answer
  • August 25, 2023

This is SO complicated! - I have seen 12+ different threads now, all with almost the same question about logic and variables, etc. 

Perhaps Typeform should look at ways of making it simpler for the user if almost everyone has the same question and it only works If x is greater than y but smaller than R and always when Q2 has a variable rate of 53 and equal to Q7


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14904 replies
  • August 25, 2023

We’ve definitely passed along the feedback, @ChrisR1705 !


  • Author
  • Explorer
  • 3 replies
  • August 26, 2023
ChrisR1705 wrote:

This is SO complicated! - I have seen 12+ different threads now, all with almost the same question about logic and variables, etc. 

Perhaps Typeform should look at ways of making it simpler for the user if almost everyone has the same question and it only works If x is greater than y but smaller than R and always when Q2 has a variable rate of 53 and equal to Q7

Completely agree with you! If I was a typeform product manager, this would make it into my feature request process. 

Another complicated thing seems to be to revoke best answer when you clicked it by mistake. But maybe this way the product managers will read it.


  • Author
  • Explorer
  • 3 replies
  • August 26, 2023

@Liz I’m still not sure how to go about it. I’ve the seen the logic builder but not sure how to apply what @john.desborough has written above. I guess I will dig into to it again. I half day project seems to turn into multiple days. I bit sad when tech really should only be the enabler for a business. If there is a specific article already that describes how to turn John’s logic into reality via Typeform, happy to read it. 


  • Explorer
  • 4 replies
  • August 26, 2023

Yes, I'm none the wiser either... This system is almost unworkable. 

 

Perhaps a different quiz hosting platform would be the faster and simpler solution? 


  • Explorer
  • 4 replies
  • August 26, 2023
john.desborough wrote:

@yoga.mimose - there are a fair number of posts related to that in the last couple of months - including one where i posted screen shots of the logic rules that were created for the highest of 5. 

here is what you need to consider building in the logic rules and i will just use A B C D E to stand for the subtotal variables

  • if A greater than B and A greater than C and A greater than D and A greater than E then go to ending A (as is the unique highest score) 
    • repeat for each of the other 4

Are you going to have a tie breaker question if there are ties at high score for each possible pair, triplet etc that are tied: 

  • if A = B and A is greater than C and A greater than D and A greater than E to q_tiebreaker for AB tied high score 
    • repeat for all the other pairs.. ie AC AD AE BC BD BE CD CE DE
    • then do the same for triplets ie A=B=C and greater than D and greater than E

 

here’s a simple sample that uses a series of questions to get you input 5 numbers to proxy the category scores and goes to a single simple tiebreaker. I use this as a base template for a whole bunch of quizzes where i simply replace all the questions with the ones that i need to use for the specifics of the quiz categories (and assign the points to the variables i use for the existing subtotal calculations) 

 

des

 

I've tried to implement this, but the option is'nt available, instead it only allows a numeric value?


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5272 replies
  • August 26, 2023

Here’s screenshots to help you figure out how to implement it.. - I can’t always give away the answers to everything .. lol.. advice/direction is free.. answers cost money .. at least that is what i’ve been told .. 

 

 

 

that’s as far as I am going to cover in the screenshots.. 

 

hope that helps to show you how to do it in the logic rules.. at least to get you started..

 

des


  • Navigating the Land
  • 1 reply
  • November 1, 2024

Here because I have the same problem 1 year later. What the post above suggests is just not a workable solution whatever way you spin it.

I have a quiz where I give them 1 of 5 possible end screens based on their total score, and I want to show and explain them their lowest scoring section out of 7 sections. Not terribly complex in theory.

However, with 7 categories and a 5-point scoring scale, you'd have hundreds of these if-rules:

  • If Total score <2 and
  • If Category 1 is 1 and
  • If Category 2 is higher than 1 and
  • If Category 3 is higher than 1 and
  • If Category 4 is higher than 1 and
  • If Category 5 is higher than 1 and
  • If Category 6 is higher than 1 and
  • If Category 7 is higher than 1
  • Then go to End screen for when Total score is <2 and Category 1 is the lowest

That's 8 IF rules just for when the Total score is <2 and Score in Category 1 is 1 and the rest is higher. I'd need 56 IF rules just to handle Total Score <2 and Category 1 is lower than the rest. 56 * 7 = 392 IF rules just to handle the end screens for when the Total score is <2. 392 * 5 = 1920 IF rules for the entire thing.

 

Whereas if I could only do “If <variable X> is lower than <variable Y>”, it'd be a lot more workable.


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14904 replies
  • November 18, 2024

Tagging ​@john.desborough in case he has any solutions/advice for you, ​@Bob2245 !


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5272 replies
  • November 19, 2024

@Liz ​@Bob2245 - it’s a fact of life.. it isn’t fun at all.. i know.. i have a whole range of templates that i have built that have even more based on all the possible tie breaking combos. 

the only way around it that i can see - and one day i will get around to this - is to push all the results to a google sheet or a database tool and run the calculation and report from there, directing the user to a results page either by sending the results back into a followup form via the API or to a landing page. 

i’m hopeful that some day Typeform Product Development will adopt my concept of a ‘logic block’ where you can create and save reusable logic statements (Typeform rules or even valid sql/python scripts, maybe) to perform complex calculations that you want to re-use over and over across forms. 

des


Forum|alt.badge.img
  • Navigating the Land
  • 6 replies
  • February 23, 2025
Bob2245 wrote:

Here because I have the same problem 1 year later. What the post above suggests is just not a workable solution whatever way you spin it.

I have a quiz where I give them 1 of 5 possible end screens based on their total score, and I want to show and explain them their lowest scoring section out of 7 sections. Not terribly complex in theory.

However, with 7 categories and a 5-point scoring scale, you'd have hundreds of these if-rules:

  • If Total score <2 and
  • If Category 1 is 1 and
  • If Category 2 is higher than 1 and
  • If Category 3 is higher than 1 and
  • If Category 4 is higher than 1 and
  • If Category 5 is higher than 1 and
  • If Category 6 is higher than 1 and
  • If Category 7 is higher than 1
  • Then go to End screen for when Total score is <2 and Category 1 is the lowest

That's 8 IF rules just for when the Total score is <2 and Score in Category 1 is 1 and the rest is higher. I'd need 56 IF rules just to handle Total Score <2 and Category 1 is lower than the rest. 56 * 7 = 392 IF rules just to handle the end screens for when the Total score is <2. 392 * 5 = 1920 IF rules for the entire thing.

 

Whereas if I could only do “If <variable X> is lower than <variable Y>”, it'd be a lot more workable.

Yep - it’s totally mind boggling to me that if you create these variables to produce a subtotal - why can’t we then just have the system do the if subtotal 1 is lower than subtotal 2 show result 1 etc


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14904 replies
  • February 27, 2025

It’s definitely on the request list, ​@RaPow ! We do have some new quiz/form builder types launching in the Spring, so hopefully that’ll solve some of the issues with having to create 12831239213 variables for a simple(ish) calculation!


  • Navigating the Land
  • 1 reply
  • March 31, 2025

OMG this is so insanely frustrating, how is there now way to check if one variable is greater than another variable??? Thats like the most basic functionality anyone could imagine in a form builder, please tell me I’m wrong and I’m just not seeing it...


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14904 replies
  • April 3, 2025

@Mikhail K We don’t have an automatic way to check this. 😪 However, you can use the solutions above to set up the calculator to do this!


Reply