# How to use conditional range control together with autofill – creating inline quotas or segments

In many cases the use of conditional range controls together with the autofill statements is very useful for creating intermediate and/or hidden questions:

1. Inline segments (based on combinations of previous answers
2. Inline quotas (also based on previous questions).
• Note: How to create inline quotas, look in the manual: “Field Work – How to go live with studies”

A typical case could be the following:

We require 3 different groups of respondents:

1 - Young men who prefer to drink beer

2 - Older men who prefer to drink beer

3 - Women who prefer to drink beer or wine OR Men, any age, that prefer to drink wine

We have these questions we can use:

The task: Fill in automatically the segments in question 4 (segments) based on the previous answers. This question will then be used for quotas and for filtering and other logics in the questionnaire

1. Create a conditional range in question segment:
• 1 try \gender=1&\birth.a.1=1980:1993&\drink=1
• 2 try \gender=1&\birth.a.1=1930:1979&\drink=1
• 3 try \gender=2&\drink=1:2
• 3 try \gender=1&\drink=2
2. Putting this together in one statement (with one and only one space in between)
• 1 try \gender=1&\birth.a.1=1980:1993&\drink=1 2 try \gender=1&\birth.a.1=1930:1979&\drink=1 3 try \gender=2&\drink=1:2 3 try \gender=1&\drink=2
3. All this is pasted into the “Programmed logic” view (limited space) and “OK”

4. In the question view the complete logic is shown:

5. The, select the Sub-question element (here marked in yellow)

6. In “options” and “logic” tab: Specify “automatically fill in answers: “sys_range c” (fill in the legal values automatically and continue)

7. This will now create a hidden question that can be addressed in any logic (and in quotas) later in the questionnaire.