Can you display a text value for a numeric variable? | Community
Skip to main content
Answered

Can you display a text value for a numeric variable?


I amusing typeform to build a skills maturity assessment. I am using the @score variable to calculate the overall maturity level, which is linked to one of three endings. However, the assessment also has 3 individual sections, and I want to calculate and display scores for each of the sections on each ending screen as well.

I have built number variables for each section (@section1, @section2, etc. and assigned logic to add value to the variable based on each answer in the section. However, on the ending screen, I want to display a text value using Recall instead of the number value. So, for Section 1, instead of seeing a result of 3/7, they see a text value like โ€œJuniorโ€.

Is there a way to assign text values to variables AND number values so you can count a score for the section variable? Is there a place to build logic like this (Iโ€™m thinking something like โ€œIf @variable is equal or less than seven, display Text โ€˜Juniorโ€™โ€. Anyone try something like this?

Best answer by john.desborough

@erin.ashworth @Liz  - itโ€™s just a set of logic rules you need to put in place. 

for the example below i would have created the section_score variables with the appropriate name as numeric and assigned the score for the section to the variable as  a logic rule on each question

i would have created a set of text variable with blank default values ie variable_level in the example below

 

and using logic rules: 

  • if section_score is less than 3 replace variable_level with โ€˜juniorโ€™
  • if section_score is greater than or equal 3 and section_score is less than 7 replace variable_level with โ€˜intermediateโ€™
  • if section_score is greater than or equal 7 and section_score is less than 11 replace variable_level with โ€˜seniorโ€™

 

and bobโ€™s yer uncle! (or at least it is intuitively apparent to the 7 other voices in my head) 

 

des

View original

2 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 15035 replies
  • July 13, 2022

@john.desborough call me crazy, but donโ€™t you have a post/example somewhere in the community with this? The below is the closest one I can find, but I could have sworn you had a more specific one!

 


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5317 replies
  • Answer
  • July 13, 2022

@erin.ashworth @Liz  - itโ€™s just a set of logic rules you need to put in place. 

for the example below i would have created the section_score variables with the appropriate name as numeric and assigned the score for the section to the variable as  a logic rule on each question

i would have created a set of text variable with blank default values ie variable_level in the example below

 

and using logic rules: 

  • if section_score is less than 3 replace variable_level with โ€˜juniorโ€™
  • if section_score is greater than or equal 3 and section_score is less than 7 replace variable_level with โ€˜intermediateโ€™
  • if section_score is greater than or equal 7 and section_score is less than 11 replace variable_level with โ€˜seniorโ€™

 

and bobโ€™s yer uncle! (or at least it is intuitively apparent to the 7 other voices in my head) 

 

des