Home > How To's > How To: Very Useful Trick using A Loop, Piping and Answer Scales!

How To: Very Useful Trick using A Loop, Piping and Answer Scales!

Overview

This how-to will show you one of the most common scripting tricks in SurveyToGo for making your survey much more efficient, robust and elegant.
Basically in this example I would show how to implement a loop that asks the same question, several times, according to selections from another question, each time for a different selection.

Let’s Do It

Let’s say for example we have the following set of questions.

First question would be:
1. Which brands have you ever heard of?    [Multi-Selection]

While its answers are derived from an answer-scale, and its last answer is an exclusive answer.

This is the second question:

2. Which of these statements suit @_@ITERNAME@_@?

Its answers would be derived from an answer scale, as following:

Second question would be within a sub chapter, as following:

*Notice that in the question itself I used @_@ITERNAME@_@ instead of ‘[NAME OF BRAND]’ – this will replace @_@ITERNAME@_@ each iteration, with the iteration name.

*Notice that question 2 would be asked for each brand selected in question 1.

Now let’s configure our sub-chapter loop to work as expected.

In its loop tab, configure it to iterate by the brands scale, and configure it to have an entrance rule.

In this case I added the following:
Contains(QRef(1),IterationIndex) && IterationIndex <8

This will basically check each iteration before it is entered:
if question 1 contains answer(Iteration Index) AND The Iteration Index is lower than 8 (as 8 Is the ‘none of the above’ answer)

Now, this loop will iterate according to our selections from question 1, and would ask all the sentences in a loop, each time for a different brand selected in question 1.

This trick is one of the most commonly used tricks in SurveyToGo and I highly recommend understanding this – it is very useful.

That’s it!

Visit us at: http://www.dooblo.net

Categories: How To's
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: