Displaying a question only at the call centre

Problem

You want to display a question only to interviewers at the call centre.

Solution

Insert a display condition using the browser's computer IP address as in:

    { $contexte{ip}=~/^192\.168\./ }

Discussion

The situation is this: you are running a dual mode survey (concurrently on the Web and as a telephone survey) and you want some questions to be reserved to interviewers in the call centre (i.e., on the internal network as opposed to on the open Internet).

To do so, implement a display condition which identifies internal network IP addresses, such as the one above. A question's display condition is a logical expression describing the circumstances when the question is displayed. Make sure to use the right network address segment as the internal network may use a different addressing range.

In the example above, the logical expression must use Perl syntax in order to make use of the $contexte data — hence the use of the braces around the condition. The Perl "=~" operator means "contains" while the circumflex accent at the beginning of the pattern anchors the comparison to the beginning of the IP address.

Note that the same logic can be used to calculate a value (with a CALCUL question) dependent upon the IP address of the respondent's computer.

Displaying a question only at the call centre

Problem

You want to display a question only to interviewers at the call centre.

Solution

Insert a display condition using the browser's computer IP address as in:

    { $contexte{ip}=~/^192\.168\./ }

Discussion

The situation is this: you are running a dual mode survey (concurrently on the Web and as a telephone survey) and you want some questions to be reserved to interviewers in the call centre (i.e., on the internal network as opposed to on the open Internet).

To do so, implement a display condition which identifies internal network IP addresses, such as the one above. A question's display condition is a logical expression describing the circumstances when the question is displayed. Make sure to use the right network address segment as the internal network may use a different addressing range.

In the example above, the logical expression must use Perl syntax in order to make use of the $contexte data — hence the use of the braces around the condition. The Perl "=~" operator means "contains" while the circumflex accent at the beginning of the pattern anchors the comparison to the beginning of the IP address.

Note that the same logic can be used to calculate a value (with a CALCUL question) dependent upon the IP address of the respondent's computer.