Difference between revisions of "How to set value for a dummy question"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "Category:Questionnaire")
 
 
Line 1: Line 1:
 
[[Category:Questionnaire]]
 
[[Category:Questionnaire]]
 +
 +
I have an "Age" question, with type number like this:
 +
 +
[[File:2018-11-19_16-17-00.png]]
 +
 +
Then I want to convert these number into some groups of age, such as:
 +
 +
*Under 40
 +
 +
*[40-49]
 +
 +
*[50-59]
 +
 +
*[60-69]
 +
 +
*70 and Over
 +
 +
<b>How to do?</b>
 +
 +
- First, create a single question "D_AgeGroup" right after "Age" question, with such options:
 +
[[File:2018-11-21_8-51-46.png]]
 +
 +
- Then, set D_AgeGroup become dummy question on Properties tab
 +
 +
[[File:2018-11-19_16-39-43.png]]
 +
 +
- Finally, go to CGScript tab, write cgscript for setting D_AgeGroup from Age
 +
[[File:2018-11-19_16-40-10.png]]
 +
 +
You are done.
 +
 +
On viewer, when clicking next at Age question, value of D_AgeGroup will be set
 +
 +
[[File:2018-11-21_9-12-46.png]]

Latest revision as of 03:24, 21 November 2018


I have an "Age" question, with type number like this:

2018-11-19 16-17-00.png

Then I want to convert these number into some groups of age, such as:

  • Under 40
  • [40-49]
  • [50-59]
  • [60-69]
  • 70 and Over

How to do?

- First, create a single question "D_AgeGroup" right after "Age" question, with such options: 2018-11-21 8-51-46.png

- Then, set D_AgeGroup become dummy question on Properties tab

2018-11-19 16-39-43.png

- Finally, go to CGScript tab, write cgscript for setting D_AgeGroup from Age 2018-11-19 16-40-10.png

You are done.

On viewer, when clicking next at Age question, value of D_AgeGroup will be set

2018-11-21 9-12-46.png