Answered

Is it possible to end with 2 results?

  • 12 April 2024
  • 3 replies
  • 32 views

Hi All. I see lots of posts on using logic to assign different endings but I don’t see if we can assign or combine 2 results/endings? I have tried 4 other quiz softwares and cannot seem to accomplish what I’m looking to do.

I would like the quiz-taker to receive one primary result and one secondary result. Where it gets tricky is that there are 6 results and 2 of them are for the primary result and 4 for the secondary result. So I haven’t figured out a way to ensure the 1st result is from the 2 primary results and the secondary result is from the other 4. Then when I thought I had it, someone tied and got 2 secondary results with a 50/50 split. =/

Can what I’m looking for be done with typeform? And if so, is there an article on this somewhere that someone knows about? 

If this is possible, do both results get saved to the lead? 

 

Thank you so much in advance (even if the answer is “no”). 

 

~RaeAnn

icon

Best answer by john.desborough 12 April 2024, 05:43

View original

3 replies

Userlevel 7
Badge +6

@Free Reign Hypnosis - Looks like you have 8 possible ‘endings’:

  • Primary1 + secondary1 
  • Primary1 + secondary2
  • Primary1 + secondary3 
  • Primary1 + secondary4 
  • Primary2 + secondary1 
  • Primary2 + secondary2
  • Primary2 + secondary3 
  • Primary2 + secondary4 

Your logic rules have to look for the primary answer first - which one has the highest (assumed) score? 

  • logic rules something like this: 
    • if Primary1 (subtotal) is greater than 0 add primary1 to p1_v_p2 (a comparison variable) 
    • if Primary 2 is greater than 0 subtract primary3 from p1_v_p2
    • if p1_v_p2 is greater than 0 (which means primary1 score is highest) replace p_choice (a text variable) with p1
    • if p1_v_p2 is less than 0 replace p_choice with p2
    • if p1_v_p2 = 0 go to a tie breaker question  (to get a selection made - if ties are at all possible) 

that will give you the primary selection 

next you have to evaluate the possible selections for the secondary winner - i am going to use s1, s2 etc for the variable names to reduce typing. You are going to have to put in logic to determine if there is a unique high (assumed) secondary score and deal withe ties.

there are a number of variables that i will show below that you would need to create to compare the secondary scores to each other. but first here’s the basic of what needs to be done in logic rules

  • if s1 is greater than s2 and s1 greater than s3 and s1 greater than s4 then s1 is the unique high score (s1 has a count of being higher than another value 3 times - this will come into play below) 
    • same if s2 is greater than the other 3, etc. 
  • the sets of rules we need to do this will have to compare the following pairings in order to get the count of ‘higher than’ for each variable
    • s1-s2, s1-s3, s1-s4, 
    • s2-s3, s2-s4
    • s3-s4
  • here’s the style of logic to use to get the ‘count of higher than’ -
    • note gt= greater than, lt = less than, 
      • if s1 gt 0 add s1 to s1_v_s2
      • if s2 gt 0 subtract s2 from s1_v_s2
      • if s1_v_s2 gt 0 add 1 to s1_count
      • if s1_v_s2 lt 0 add 1 to s2_count
      • (this needs to be repeated for all the combinations  - i’ll do the next one then you can figure out the rest)
      • if s1 gt 0 add s1 to s1_v_s3
      • if s3 gt 0 subtract s3 from s1_v_s3
      • if s1_v_s3 gt 0 add 1 to s1_count
      • if s1_v_s3 lt 0 add 1 to s3_count
      •   
      • repeat for all the pairings above
    • now we look at the sX_count variables to see if there is a unique high score of 3 - which is the highest count it could get from the above
      • if s1_count = 3 replace s_choice with secondary1 
      • if s2_count =3 replace s_choice with secondary2
      • if s3_count =3 replace s_choice with secondary3
      • if s4_count = 3 replace s_choice with secondary4
    • what happens if there are no 3 counts? you have to determine if there is a unique count at 2 - there could be some cases where the values are tied and no points would have been added to an sX_count variable. 
      • if s1_count = 2 and s2_count lt 2 and s3_count lt 2 and s4_count lt 2 then replace s_choice with secondary1 
        • s1_count is uniquely high at a count of 2
      • repeat for s2_count = 2 and the others lt 2, s3_count = 2 and others lt 2 and s3_count = 2 and others lt 2
        • that will cover all the unique high counts at 2
    • now to look at ties at the 2 count level - you need to look at rules like this to go to a tiebreaker question for the items that are tied: 
      • if s1_count = 2 and s2_count =2 and s3+count lt 2 and s4_count lt 2 go to s1-s2 tiebreaker
      • if s1_count = 2 and s3_count -2 and s1_count lt 2 and s4_count lt 2 go to s1-s3 tiebreaker
      • repeat to cover off all the possible pairs that could be tied at 2 - with only 4 possible secondary values, you only need to look at pairs 
      • if there is a tiebreaker question you would use a logic rule to set the s_choice variable to the appropriate value that was selected 
    • if there are counts of 2 - which is possible in the case of the sx_v_sx = 0 for scores - you wold have to do the same type of evaluatoin at sX_counts of 1 
      • here you would evaluate pairs and then the triplets for = 1 counts and if unique at 1 you have your secondary choice if there are ties, you have another set of tie breakers - you can use the same pair tiebreaker questions as above, but  you need to test
        • if s1_count =1 and s2_count =1 and s3_count = 1 and s4_count lt 1 then go to s1-s2-s3 tiebreaker
          • the combinations to test would be 
            • s1,s2,s3
            • s1, s2, s4
            • s2, s3, s4
    • if the s_counts are all = 0 then you have a coin toss or a scoring issue lol

 

after all that .. you have the p_choice and the s_choice identified and you can use the logic rules like this to go to the ‘combined ending’ you are seeking 

  • if p_choice = primary1 and s_choice = secondary1 go to that ending (p1-s1)
  • if p_choice = primary1 and s_choice = secondary2 go to that ending (p1-s2)
  • etc. 

 

that may seem like a convoluted way to do this but with 4 totals to compare it’s fairly easy to get through the tiebreaker comparisons - if you have 6 variables, you have about 150+ possible tiebreakers to check for and pages to create. lol. 

hope that helps make it easier to understand. 

 

des

 

 

Thank you Des! I appreciate your response and the time that went into these very detailed instructions. I, surprisingly, understood the directions, set it up, and got all the way down to almost the end but got lost with the tiebreakers. I didn’t know where to establish tiebreaker info. I understood the “If s1 = X, and s2 = X, and s3 is < X, and s4 < X”. But the s1-s2 tiebreaker? That lost me. lol. And without the tiebreaker info every single time I take the quiz it gives me the same p1-s1 result. It was definitely a fun experience but I think this is beyond my skill set at this point so I’ll try to hire this out. Thank you again. :) 

Userlevel 7
Badge +6

@Free Reign Hypnosis - you would need to a create the tie breaker questions later in your sequence - ie right after the logic rules above. and you would have a page for each of the pairs with something like this: 

  • You’ve got two ‘traits’ that are so closely aligned, I need you to select an answer from below to break the tie - don’t worry, this won’t put you in a specific box permanently. We just use it as a starting point 
    • select S1 text
    • select S2 text 

you would have a page like that for each possible tie and then based on the user’s selection, you now have the secondary choice to align with the the routing ..

 

but thanks for the kind words and congrats on taking one huge step forward. 

 

des

Reply