Answered

Is my calculation possible to generate with Typeform?

  • 4 April 2022
  • 8 replies
  • 764 views

Userlevel 2

Hello,

I am attempting to create a four question quiz and am having difficulty trying to figure out how to configure the backend logic for the equation/end scores.

Each question response is added to a custom variable (field_1, field_2, field_3, field_4):

My issue comes with generating the 3 different calculations off of those inputs from the four questions. Here are the calculations that I am trying to work out:

 

Calc/score 1: [(FIELD 2 x FIELD 3) - FIELD 1]

Calc/score 2: [Outcome of Calc/score 1/FIELD 1]

Calc/score 3: [((FIELD 2 x FIELD 3) x FIELD 4) - FIELD 1]

 

I can multiple two fields without issue, but I’m not sure how to create a custom variable to represent the sum of 2 or 3 fields being multiplied together. I also can’t have multiple ‘Then’ steps in one section of logic that would help complete this as well.

 

Any thoughts/feedback on if this is possible would be greatly appreciated.

icon

Best answer by john.desborough 6 April 2022, 03:59

View original

8 replies

Userlevel 7
Badge +5

Hi @Merrik Happy Monday! What exactly are you calculating or what is the goal of the form itself? That might help us either figure this out for you or some workarounds. 

Additionally, where in the form are you adding the calculations? All at the end or on a specific question? 

Thank you in advance!

Userlevel 7
Badge +6

@Merrik - here’s a little sample ( @Liz - lol you knew this was coming)

rather than using the scores i entered into the questions for the calculation, i assigned the values to variables to match what you had done above, sort of lol)

here’s the logic screens i used.. 

hope that helps.. and/or meets what you were thinking lol

 

des

Userlevel 2

@Liz @john.desborough, thank you both for your help with this.

 

@john.desborough, I tweaked the logic that you had provided in your screenshots in an effort to try and get to where I need to be, but am still having issues with the second two score, as the current logic doesn’t generate the correct answer:

Calc/score 2: [(Outcome of Calc/score 1)/FIELD 1]

Calc/score 3: [((FIELD 2 x FIELD 3) x FIELD 4) - FIELD 1]

 

 

Userlevel 7
Badge +6

@Merrik can you take some screen shots of what you did in the logic? 

i’ve tested the logic at my end and i did notice an error in my logic stream - my apologies.. i will fix that and repost shortly 

 

 

 

des

Userlevel 7
Badge +6

Revised logic shots:

 

(it was a silly mistake at my end of using f1 and f2 instead of f2 and f3 in the prior shots.. ) 

 

this should work better now.. 

 

same link to the form 

 

 

Userlevel 2

@john.desborough This worked! Thank you for taking the time to help me troubleshoot this.

Userlevel 7
Badge +6

Glad it worked for you.. pay it forward!! lol

 

cheers

 

des

Userlevel 7
Badge +5

Hey @Merrik! Why don't you share the link to your form over here? We'd love to check the final result of your quiz! 😊

Reply