Skip to main content
Answered

Conditional Logic based on score relationships

  • 19 July 2024
  • 4 replies
  • 35 views

Hi everyone

I hope you can help me overcome a challenge I have in setting up a form that requires conditional direction to a specific page in a form based on the relationship between 3 scores.

I have three variables (variable 1, variable 2, variable 3) each with its own calculated score.

I want to define logic that allows me to point to a specific recommendation page based on the outcome of the scores as follows.

Recommendation 1 if the value of Variable 1 score is < the value of Variable 2 score AND the Variable 3 score is in the range of 80% - 89%.
Recommendation 2 if the value of Variable 1 score > the value of the Variable 2 score BUT the Variable 3 score is at least 90%.
Recommendation 3 if the value of Variable 1 is < the value of Variable 2 score BUT the Variable 3 score is 50% or less.
Recommendation 4 if the value of Variable 1 is > the value of the Variable 2 score AND the Variable 3 score is 50% or less.

4 replies

Userlevel 7
Badge +5

@john.desborough is your guy for variables and logic! 😁

Thanks @Liz 

Userlevel 7
Badge +6

@raymacoz @Liz - a shorter answer than normal cuz i am on vacation 

re:Recommendation 1 if the value of Variable 1 score is < the value of Variable 2 score AND the Variable 3 score is in the range of 80% - 89%.

create a variable called v_calc 

logic rules:

  • if var1 greater than or equal0 add var 1 to v_calc
  • if var2 greater than or equal to 0 subtract var2 from v_calc
  • if v_calc is greater than 0 And var3 is greater than or equal to 80 and var3 is less than or equal to 89 go to recommendation 1 (ending page or statement)

similar logic for all the scenarios

des

Thanks @john.desborough 

Reply