Chapter 9 – Child Surveys or running surveys from within surveys
SurveyToGo enables you to start a survey from within another survey. This feature can be used for a bunch of different purposes such as:
- Filling out surveys in response to conditions. For example: a survey for a retail store, that requires a different survey if the store was close.
- Filling out surveys in response to events in the field. For example: general medical device survey, where if while filling out the general questions, the patient suddenly reacts you need to fill out a survey about his/her reaction then continue back to filling the general survey.
- Simple loops.
Each child survey is rendered as a menu option on the device allowing for quick ad-hoc filling of child surveys.
How to make it happen?
In order to configure child surveys for a father survey, you just need to specify for the master survey which survey(s) are its child surveys. To accomplish this, do the following:
- Open the main survey.
- Click the “Edit Child Surveys” link on the advanced tab of the survey node:
- Click the “+” button to add a new child survey, then fill out the “Button Text” text. This text will be shown on the menu of the device:
Then, click the “…” button to select the actual child survey from your existing surveys. Please note you can select any survey you want, and you can have a survey be a child survey of more then 1 parent.
- Click the “+” button to add more surveys or the “OK” button to finish.
- That’s it. You can now deploy the survey to the device and on the device you will see a menu
Working with child surveys on the device
Now, on the device when running the survey you will see a menu named “More”:
You can then select the relevant child survey from the list of surveys. This will start a new run of the child survey, after which you will return to the current survey.
To edit surveys you have already conducted tap the “Edit Additional Surveys” menu option, and then select the relevant survey.
How to change the “Data” field of child surveys for later editing?
When you choose to edit additional surveys from the device by clicking the option:
You will see a screen that lists out the various child surveys you have filled out. For example:
|Name||Name of the child survey|
|Time||The time when you have started the child survey run|
|Data||Additional data that can be associated with the child survey run.|
The “Data” field can be used to specify whatever data you might want to associate with the child survey run. This can be an answer to one of the child survey questions, a static text or whatever you choose. You can change the text that will be shown on this field by interacting with the “SubjectData” variable in the survey designer. To change the text content of this field:
- Open the child survey in the survey designer
- In the Rules tab of the main survey node, add the following text in the survey init code:
- Save and deploy the survey.
- You will now see “Central Park” as the “Data” field of all the child surveys.
Please note you can interact with the “SubjectData” variable anywhere in the questionnaire, including Expression questions, start/end question scripts etc..
You can have the “Data” field showing the answer of question #1 of the child survey.