Answered

Changing text in variables based on calculation of scores

  • 2 November 2021
  • 9 replies
  • 390 views

Userlevel 1
Badge

Hi team,

I’m trying to display a ‘change of text’ in a variable based on a score calculation.
Similar to John Desborough’s approach here - 

  •  I’ve setup 5 question groups
  • each Likert-style score is allocated in the ‘score quiz’ section
  • each score is entered & added to a ‘group score’ variable
group score inserted into variable
  • each group score is summarised with ‘score’ + ‘response’ variables
rules and calculations into [response] variable

Now the tricky bit…
I’m trying to replace the ‘default’ text entry of [response] with a text phrase that is calculated from one of two rules (see image above).

Once all values are entered, the text isn’t being replaced in [response] variable…

The ‘default’ value is being displayed and rules being ignored.


I want to use this method in the final summary statement screen rather than use ‘jump to...’ endings method.

Any insights or tips greatly appreciated!

cheers,
Jason

icon

Best answer by john.desborough 2 November 2021, 13:56

View original

9 replies

Userlevel 7
Badge +5

Hi @p1x3lman Welcome to the community! Glad you were able to find @john.desborough ‘s post from earlier. :grinning: Just to double check, are the statements appearing after all of your questions? If not, you’ll first want to be sure the statements are the last questions to appear on your form. 

Userlevel 7
Badge +6

@p1x3lman - welcome to the madness!

I think that you would be better served to create a variable called sub_score_N for each question group and add the tally from each question in the group to that variable. then at the end, add the sub_score_N variables to the score variable to get your total.. unless this has been fixed by the product dev team, whenever you use the “always add score to a variable” it will add the current value of score to whatever variable you have score pointing towards - all through the form, wherever you have used score.. You are better to use the “if qX response is a or b or c or…. then add qX response to sub_score_N” than the always statement

des

Userlevel 1
Badge

Hi @Liz and @john.desborough - thanks so much for your rapid responses and your assistance.
I should have been clearer in my explanation…

I don’t need to tally a ‘total’ score from each of the question groups, just a reference of the ‘score’ and the associated ‘response’ against each of the skills in a summary slide, that will be presented at the end of the entire form. See below…

Likert calculations and relative responses:

  • If [score] ≤0 (for each skill group), [response] = “You might want to consider this skill needing your attention for future improvement.”
  • If [score] >0 (for each skill group), [response] = “Seems like you're ok with this skill for now.”

So…

for the score variables for each group, should I create separate variables?

i.e. skill1_score, skill2_score...etc…

and then attach the ‘default’ response statements based on the results of the calculations?

 

If yes, then typeform isn’t rendering the ‘replace’ variable function with alternative text (see screenshot 3 in my initial post).

Any assistance is massively appreciated!!!

 

cheers,

JD

 

Userlevel 7
Badge +6

@p1x3lman - the problem is that using the score variable for each section/skill is going to have the single variable score overwritten every time.. hence the reason why i suggest using a set of variables (i referred to them as sub_score_N ie for sub_score_1 or score_skill1 etc.) that way you have a separate ‘scoring’ variable for each skill/section

step one: get all the sub_score variables (or whatever you want to call them) created first and make sure they are tallying up the correct point for the responses. 

once that is done, then you should be able to get the replace logic to work. 

start with step one. 

 

des

Userlevel 1
Badge

Thanks so much John - I’ll be online working on this later tonight (in 3 hrs or so)...are you around then? What’s your timezone?

Userlevel 7
Badge +6

eastern time zone.. and back at the desk around 830 eastern time.. the early morning shift is already spoken for here today lol

Userlevel 7
Badge +5

Let us know how the form building goes for you, @p1x3lman ! Additionally, it might be worth reaching out to our support team here for more immediate 1-1 support, too. :grinning:

Userlevel 1
Badge

Hi @john.desborough and @Liz - this is why I love this tool...and developing more love for this community...well at least for the both of you. :)

Good news, a good friend with a mathematical brain assisted me with the calculations on the score.
The variable recommendation worked a treat - thanks so much for the time invested in responding to assist me.

In return, I’ll post a detailed extract on how the final solution was put together.

Many thanks and much gratitude! :sunglasses:

Userlevel 7
Badge +6

Glad to hear @p1x3lman !! cheers to you and a happier weekend!

 

des

Reply