Score Variable to Specific Ending | Community
Skip to main content
Answered

Score Variable to Specific Ending


Hi there, 

I’m trying to create a Survey Evaluation that requires the Advanced logic using the Branching and Calculations. 

At the end, I’d like the score variable to lead to a specific Ending, in which the Ending will have the users score and interpretation of the score.  For example, a score of 20 from our survey would lead to Ending A, which will tell the user what that score means.

Is this possible? I see that it’s possible under simple logic, but I can’t figure out how to do it with Advanced logic function.

Thanks

Cal

Best answer by vickioneill

@john.desborough I’m going to refer to your response in the future when I’m struggling. This is a very detailed description of the logic needed. Thank you for providing that level of detail!

I just shared these screenshots in another post for a visual reference, @ctngo3 . I hope it’s also helpful. 

 

View original

19 replies

john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5260 replies
  • March 16, 2021

@ctngo3 - this is from a user as well

I do this on several of my typeforms: where i have a series of question groups, each with their own set of questions and ‘score ratings’ for results, and an overall score value that routes users to one of 4 specific ending paths, complete with summary details, typical things you can do to improve in your level and climb higher and some custom images/graphs 

i did the following in the advanced logic area with variables and branching/calculation

  • set subtotal variables for each question group ie q1_group_score, q2_group_score etc
  • i added the score from the questions within a group to the appropriate group_score variable 
    • with a Likert like question, you can simply add the response value to the variable ie @recall_q1a to the subgroup (it is already a number) 
    • if you use a multiple choice like severley disagree, disagree, moderately agree etc, you would need to add logic rules to the question to tell it to add a specific value to the variable ie if Severely disagree then add 1 to q1_group_score.
    • add q1 and q1 and q3 group scores, etc to score (the total variable)
  • then i put in a statement page that summarizes the responses and interim score as necessary and let them know that we are going to display the next page based on their score
    • if score is greater than 32 jump to ending A, if score is greater than 20 and less than or equal to 32 then jump to ending B, etc. 

that seems to be able to address what you are looking to achieve, at least i hope it moves the needle a little. 

 

there are several threads within this community that cover the topic. 

 

cheers

 

des


vickioneill
Forum|alt.badge.img+5
  • Tastemaker
  • 320 replies
  • Answer
  • March 16, 2021

@john.desborough I’m going to refer to your response in the future when I’m struggling. This is a very detailed description of the logic needed. Thank you for providing that level of detail!

I just shared these screenshots in another post for a visual reference, @ctngo3 . I hope it’s also helpful. 

 


  • Author
  • Explorer
  • 1 reply
  • March 17, 2021

Thank you everyone! Very much appreciated!


  • Navigating the Land
  • 3 replies
  • February 11, 2022

Hey @john.desborough - you sir are an absolute Typeform legend!  Thank you so much for all the posts you do in this community, it’s helped me so much.

 

I am struggling to find an answer to my current predicament: I have a bunch of variables with their own ‘scores’ in, and at the end of my quiz I want these variables to link to a certain ending - the issue I am having is using these variables to interact with Typeform’s native ‘@score’ variable which will determine which ending someone is redirected to.

 

Here is a screenshot of my issue:

 

In my head, I would add my variable to “score” and it would dictate what ending I send the user to.  If you have any ideas that would be awesome!


  • Navigating the Land
  • 3 replies
  • February 11, 2022

Basically I can’t select @score in the right hand side of an if statement!


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5260 replies
  • February 12, 2022

@coysammy - so the issue you are seeking to resolve sounds like this: 

  •  you have a set of variables and you want to send the user to the ending associated with the highest one? 
    • if this is the case, you don’t need to add them to score, you need to evaluate things like
      • if immunity greater than beauty AND  immunity greater than gut etc…. if all of this is true then send the user to the ‘immunity ending page’ 
      • if beauty is greater than immunity and beauty is greater than gut etc  … if all true then send the user to the beauty ending page.. 
      • do for all the cases 
      • this will give you the first pass on the ‘single unique highest score’ that routes folks to the correct page..
      • but what happens if you know that won’t always be the case… you need to evaluate ‘how many times is variable X higher than the others” then take the highest number count and determine the path based on that
        • that is where you need to start using another set of variables to do the comparison (or at least this is the method that i use) - i create a set of variables to use for the calculations something like this: v_cat1_vs_cat2 and the logic rules would be something like this 
          • if cat1 (ie gut) is gt 0 add cat1 to v_cat1_vs_cat2
          • if cat2 (ie immunity) is gt 0 subtract cat2 from v_cat1_vs_cat2
          • then if the value of the “..vs..” gt 0 add 1 to the cat1_is_biggest variable
          • if the value of the vs variable is lt 0 add 1 to the cat2_is_biggest variable
        • repeat for all combinations.. 
        • then you can determine which has the biggest count - since it is not unique ie in a case of 6 categories you would only get 1 result of 5 gt’s (that is covered by the unique option outlined way up) - here you are looking to see if there is a unique 4-count (of higher than other variables - there could be ties.. 

it can be a long drawn out process to determine which one ending you are going to send them to, depending on the number of categories you are looking at. 

 

Here’s a little example form that walks you through a 5-category example .. it will show you some of the output of the calculations in the walk through 

is this what you are trying to do?? 

 

des


  • Navigating the Land
  • 3 replies
  • February 14, 2022

Hey @john.desborough - thank you very much for taking the time to reply!


I am afraid it’s not quite as simple as this.  Within my quiz, there are a different # of questions for each variable (e.g. immunity has 12 possible points throughout the quiz, whereas gut only has 5 possible answers).

So I was hoping to say, if gut >=4 (with limited questions, the user has stated that gut is always important), then make “@score” = 2 (and set the score based ending to take the user to ending for score = 2).

My issue is that for some reason I cannot select @score from the right hand side of the if logic in typeform and I am not sure why!


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5260 replies
  • February 14, 2022

@coysammy - suggest NOT using score but creating another variable, call it v_score, and try using that as the subtotal that drives the user to the ending and not score.. 

 

if that doesn’t work, raise a help ticket with the support desk

des


  • Navigating the Land
  • 2 replies
  • May 26, 2023

Hi @john.desborough not sure if you can help, but the logic I am trying to create is:

  • Answers to questions will add a number to a custom variable, e.g variable_0, variable_1 e.t.c….
  • For the final screen, determine which variable is the highest and display an end screen based on that.

I saw that you answered how to do this above by saying:

if immunity greater than beauty AND  immunity greater than gut etc…. if all of this is true then send the user to the ‘immunity ending page’

However, I do not have the ability in the logic to say: if variable_0>variable_1 then ……

It only lets me do: if variable_0>number then…….

In other words it only lets me compare a variable against a number, not another variable.

 

Any ideas?


  • Navigating the Land
  • 2 replies
  • May 26, 2023

This screenshot relates to my post above.

 


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

@timphillips77 - try this sort:

  • if v_1 greater than 0 then add v_1 to v_1_minus_v2
  • if v_2 greater than 0 then subtract v_2 from v_minus_v2
  • if v_1_minus_2 is GT 0 then go to …
  • if v_1 subtract v_2 is greater than 0  then go to .. (same result as above)
  • if v_1 subtract v_2 is less than 0 then go ….
  • if in either case the result = 0 you have a tie

small sample

des


  • Navigating the Land
  • 1 reply
  • June 9, 2023

Hi @john.desborough, thank you for your answer. I am trying to apply it without success. I would like to explain my situation. 

I have 18 answers and 6 variables. Each variable is composed by 3 answers, and each answer have a possible value from 1 to 5. The highest variable will lead to a different ending.   

Could you share an image of one of the logics on typeform as a reference for this situation? 
Thank you 


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

@coysammy - so the issue you are seeking to resolve sounds like this: 

  •  you have a set of variables and you want to send the user to the ending associated with the highest one? 
    • if this is the case, you don’t need to add them to score, you need to evaluate things like
      • if immunity greater than beauty AND  immunity greater than gut etc…. if all of this is true then send the user to the ‘immunity ending page’ 
      • if beauty is greater than immunity and beauty is greater than gut etc  … if all true then send the user to the beauty ending page.. 
      • do for all the cases 
      • this will give you the first pass on the ‘single unique highest score’ that routes folks to the correct page..
      • but what happens if you know that won’t always be the case… you need to evaluate ‘how many times is variable X higher than the others” then take the highest number count and determine the path based on that
        • that is where you need to start using another set of variables to do the comparison (or at least this is the method that i use) - i create a set of variables to use for the calculations something like this: v_cat1_vs_cat2 and the logic rules would be something like this 
          • if cat1 (ie gut) is gt 0 add cat1 to v_cat1_vs_cat2
          • if cat2 (ie immunity) is gt 0 subtract cat2 from v_cat1_vs_cat2
          • then if the value of the “..vs..” gt 0 add 1 to the cat1_is_biggest variable
          • if the value of the vs variable is lt 0 add 1 to the cat2_is_biggest variable
        • repeat for all combinations.. 
        • then you can determine which has the biggest count - since it is not unique ie in a case of 6 categories you would only get 1 result of 5 gt’s (that is covered by the unique option outlined way up) - here you are looking to see if there is a unique 4-count (of higher than other variables - there could be ties.. 

it can be a long drawn out process to determine which one ending you are going to send them to, depending on the number of categories you are looking at. 

 

Here’s a little example form that walks you through a 5-category example .. it will show you some of the output of the calculations in the walk through 

is this what you are trying to do?? 

 

des

Hello,

This is exactly what I’m trying to do but after running through the link you provided it seems like I can’t display the results as I’d like?  I have 4 sections with 5 questions each that are rated 1-5 for each question.  I created variables to produce subtotals (as displayed in your example) so I can score each pf the 4 sections - but then I wanted to direct people to a specific end page for the lowest scoring section result?

It states on the example provided above that this isn’t possible?  Is this correct?  It seems a bit crazy that we can do all these complex calculations but then can’t simply direct someone to the lowest outcome for a specific subtotal/score?  All I could do is display all of the subtotals for them to see rather than directing them to the lowest?  I wanted to provide training and recommendation on that specific section rather than just provide a page with score results.


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5260 replies
  • February 23, 2025

@RaPow - it is possible based on the lowest score - you just have to work the logic to determine the lowest score and what to do if there are ties at the lowest score. 

if you have set it up that the minimum score someone could have in a a section is 5 (5 questions at 1 point each) then your logic would be something like this: 

  • if v_A = 5 and v_B greater that 5 and v_C greater than 5 and v_D greater than 5 then go to ending_A
  • if v_B = 5 and v_A greater that 5 and v_C greater than 5 and v_D greater than 5 then go to ending_B
  • etc

that would give you the logic pattern for a unique low score of 5 and route to the lowest score ending page as appropriate. 

 

but if there no scores of 5, then you would have to look at 6 as the low score and determine uniqueness in the same fashion

the question to wrestle is ties: if v_A = 5 and v_D = 5 and the others are greater than 5, what do you do? send them to a generic tie-breaking question or one specific for the use case where v_A and v_D are the options to break the tie? 

give it a try

des


Forum|alt.badge.img
  • Navigating the Land
  • 6 replies
  • February 24, 2025
john.desborough wrote:

@RaPow - it is possible based on the lowest score - you just have to work the logic to determine the lowest score and what to do if there are ties at the lowest score. 

if you have set it up that the minimum score someone could have in a a section is 5 (5 questions at 1 point each) then your logic would be something like this: 

  • if v_A = 5 and v_B greater that 5 and v_C greater than 5 and v_D greater than 5 then go to ending_A
  • if v_B = 5 and v_A greater that 5 and v_C greater than 5 and v_D greater than 5 then go to ending_B
  • etc

that would give you the logic pattern for a unique low score of 5 and route to the lowest score ending page as appropriate. 

 

but if there no scores of 5, then you would have to look at 6 as the low score and determine uniqueness in the same fashion

the question to wrestle is ties: if v_A = 5 and v_D = 5 and the others are greater than 5, what do you do? send them to a generic tie-breaking question or one specific for the use case where v_A and v_D are the options to break the tie? 

give it a try

des

Thanks Des :)

But does this mean that I’d have to go through every possible low scoring number to create rules from 5 to 24 (which is the highest low score someone could get other than perfect 25 across the board (which I’ve never seen happen)? Such as if:

  • v_A = 6 and etc
  • v_A = 7 and etc
  • v_A = 8 and etc

And I’d then have to do that for every variable as well? 😮‍💨🤯🫠


Forum|alt.badge.img
  • Navigating the Land
  • 6 replies
  • February 24, 2025

@john.desborough Also just thinking about the tie breaks - I thought I read somewhere that in the case of a tie break the system would automatically send the person to the page in order or sequence?  Or is that not true? 😅 I’ve created statement pages as the specific results pages for my 4 sections and then thought I’d have a single ending page with “What Now?” as a final close page (which everyone sees regardless of their results?


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5260 replies
  • February 24, 2025

@RaPow - that is the outcome quiz. 

in all honesty the purpose of these quizzes is not necessarily to give the user the be-all and end-all result is it? it’s to get them to engage and to draw them in.. so that we can nurture them into our buying sequence/offer. and whether you use the statement page approach or an ending page, you still want the respondent to take the next step. 

des


Forum|alt.badge.img
  • Navigating the Land
  • 6 replies
  • February 24, 2025

@john.desborough true though I help people who’ve been through a life-changing event figure out what’s next in life, so I do want them to have as accurate a result as possible, for this important work.

I’m on with setting up all these rules but it’s definitely not a job for the faint hearted - it’s got to be a quiz/questionnaire that you really care about or need, for this level of work involved (unless I’m missing an easier method - paying someone else to do it springs to mind for next time 😆).

One last question Des - for the tie-breaker question with doing this work for nearly 20 years, I have a sense of which section is a priority for even scores - so would I just put a final set of “tie-break” logic rules with:

if v_A is equal to 5 and v_b is equal to 5 and v_C is equal to…. etc then go to (and the most important section).

and so on for each score from 5-24? Will be so glad when got this built - I might treat myself to a nice dinner once finished as a celebration 🥳

Thank you very much for your thoughts - I can see how brilliant you are at supporting everyone in these queries across the platform 🤩


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5260 replies
  • February 24, 2025

@RaPow - more or less lol.. 

and so on for each score from 5-24? Will be so glad when got this built - I might treat myself to a nice dinner once finished as a celebration 🥳

yeah you will have to do that for each of the possible options

i would love to see something developed and available from Typeform that would be a sort of Rank() function where you could specify ascending/descending, the list of variables to include in the rank and the name of an output variable. also need a displayRank() function along the lines of which rank variable, which cardinal position ie 1-n or blank, and if blank the default to all variables displayed in the rank order. 

note i did a recent 12-category high rank and with tie breakers, it had over 1400 logic rules and made me go bug-eyed… 

just sayin’