Questionnaire design

Response recall

CallWeb allows for the recall of three types of information in the question text, question note and answer categories:

SyntaxActionNotes
&questionRecall of the label of the answer selected by the respondentRecalling a RELATION question this way will insert a complete table of the children in the recall location.
&@questionRecall of the answer code selected by the respondent (the numeric code associated with a regular question)Recalling a RELATION question this way will insert the number of children in the recall location.
&&AquestionRecall of the open-end answer provided by the respondent (alphanumeric or numeric open end parts) 
&question#nRecall of the ALIAS "n" of the response code. See the page on answer categories for the concept of alias.If no alias exists for a given answer category, the main label is displayed. This syntax is useful to adapt the recall of an answer to the context of the question (to add an article or to capitalize, for example.)

Recalls can be performed on data stored in any type of question, be that a regular "asked" question or a BLANK question, a CALCUL question, etc.

Example of recall of the answer category selection in question Q1:

    % Question text
    [EN]Earlier, you mentioned that you are generally considered a &Q1? Was it always the case?
    [FR]Vous avez mentionné plus tôt que vous êtes généralement vu(e) comme un(e) &Q1? Est-ce que cela a toujours été le cas?

Recall pound instruction

Special recall values can be created using the "# Recall" or "# Rappel" instruction. The syntax of the instruction is as follows:

    # Recall some_label = [EN]recalled_text[FR]texte_rappelé

These values are recalled using the following syntax: &#some_label. For example, all "New" icons used in this documentation appear using

    &#NEW which is defined in the following pound instruction: # Recall NEW = <img src="cwdoc/new.gif" style="vertical-align:middle">.

To avoid clashes with HTML symbols, some_label must be in capital letters when recalled and it must start with a letter. It can contain letters, numbers and the underscore character.

# RECALL (or # RAPPEL) can use display conditions so that different substitutions are done under different circumstances. Display conditions come right before the recalled value itself as in:

    # Recall WORD = [AQ1.LE.1][EN]word[FR]mot[AQ1.GT.1][EN]words[FR]mots

In this example, &#WORD recalls "word" (singular) if AQ1 is less than or equal to 1 and "words" (plural) if AQ1 is greater than 1.

The display condition is expressed in xBase syntax unless it is within braces and it is expressed in Perl syntax. If the display condition contains a closed bracket symbol (as in a Perl regular expression including classes of characters), use double open and closed bracket symbols to delimit it (as in [[{condition}]]). The recalled text of the first matching display condition is used. The condition [ELSE] is always true; it is useful to conclude a series of conditions.

If the recall is followed by a tilde (e.g. &#WORD~), this character serves as a delimiter and is NOT transmitted to the questionnaire page thereby allowing the absence of spacing between the ercall and the text that follows it..

Advanced features

Recalled values are inserted within HTML <SPAN> markers to give them the SUBSTITUT style. This can interfere with the proper display of some recalled values — particularly if the recalled values are placed within hyperlink marks. To avoid the addition of the SUBSTITUT style, insert a tilde character (~) between the recall symbols and the variable name as in the following:

    % Question text
    [EN]Earlier, you mentioned that you are generally considered a &~Q1? Was it always the case?
    [FR]Vous avez mentionné plus tôt que vous êtes généralement vu(e) comme un(e) &~Q1? Est-ce que cela a toujours été le cas?

It is possible to recall any variable available in the Perl environment as part of the CallWeb script (see the context data, in particular). The recall syntax is then {$variable}. For example, the following page header would cite the current case access code:

    # HEADER EN = Your case access code is {$_telkey}

Recalled values may contain recalls. For example, the following instruction is valid and will recall the _telkey value using &#TELKEY:

    # Recall TELKEY = {$_telkey}

There is yet another type of recall (although it is more than a simple recall). Any Perl expression (not only variable names) can be displayed where substitutions are allowed using the following syntax:

    <EXECUTE>Perl expression</EXECUTE>

Using this syntax, one can display the result of complex calculations without having to store them in a CallWeb question field.

Also, it is possible to calculate the result of a recall into a question or as part of an EXECUTE tag. See the "substitue" function on the computed questions page.

Finally, here is a specialized type of substitution: <crypt>text</crypt>. The text between these tags is encrypted using the cover function. There is a special application of this type of substitution. Options inserted in CallWeb questionnaire URLs can be obfuscated using syntax like the following:

    http://somedomain.com/cwx.cgi?_crypt=<crypt>_proj=THISPROJECT&_telkey=SOMETELKEY</crypt>

which produces

    http://somedomain.com/cwx.cgi?_crypt=0648090e3706020808253b346d0370622a45362a172e1a13380e0e123916016c1f322319

Used in an e-mail invitation, for example, CallWeb encodes the value between <crypt></crypt> tags and associates it to the _crypt URL option. This option is decompressed by CallWeb to recover the initial options and values that the encrypted text contains. It is possible to encrypt only a portion of the URL options if there are advantages to doing so.

Questionnaire design

Response recall

CallWeb allows for the recall of three types of information in the question text, question note and answer categories:

SyntaxActionNotes
&questionRecall of the label of the answer selected by the respondentRecalling a RELATION question this way will insert a complete table of the children in the recall location.
&@questionRecall of the answer code selected by the respondent (the numeric code associated with a regular question)Recalling a RELATION question this way will insert the number of children in the recall location.
&&AquestionRecall of the open-end answer provided by the respondent (alphanumeric or numeric open end parts) 
&question#nRecall of the ALIAS "n" of the response code. See the page on answer categories for the concept of alias.If no alias exists for a given answer category, the main label is displayed. This syntax is useful to adapt the recall of an answer to the context of the question (to add an article or to capitalize, for example.)

Recalls can be performed on data stored in any type of question, be that a regular "asked" question or a BLANK question, a CALCUL question, etc.

Example of recall of the answer category selection in question Q1:

    % Question text
    [EN]Earlier, you mentioned that you are generally considered a &Q1? Was it always the case?
    [FR]Vous avez mentionné plus tôt que vous êtes généralement vu(e) comme un(e) &Q1? Est-ce que cela a toujours été le cas?

Recall pound instruction

Special recall values can be created using the "# Recall" or "# Rappel" instruction. The syntax of the instruction is as follows:

    # Recall some_label = [EN]recalled_text[FR]texte_rappelé

These values are recalled using the following syntax: &#some_label. For example, all "New" icons used in this documentation appear using

    &#NEW which is defined in the following pound instruction: # Recall NEW = <img src="cwdoc/new.gif" style="vertical-align:middle">.

To avoid clashes with HTML symbols, some_label must be in capital letters when recalled and it must start with a letter. It can contain letters, numbers and the underscore character.

# RECALL (or # RAPPEL) can use display conditions so that different substitutions are done under different circumstances. Display conditions come right before the recalled value itself as in:

    # Recall WORD = [AQ1.LE.1][EN]word[FR]mot[AQ1.GT.1][EN]words[FR]mots

In this example, &#WORD recalls "word" (singular) if AQ1 is less than or equal to 1 and "words" (plural) if AQ1 is greater than 1.

The display condition is expressed in xBase syntax unless it is within braces and it is expressed in Perl syntax. If the display condition contains a closed bracket symbol (as in a Perl regular expression including classes of characters), use double open and closed bracket symbols to delimit it (as in [[{condition}]]). The recalled text of the first matching display condition is used. The condition [ELSE] is always true; it is useful to conclude a series of conditions.

If the recall is followed by a tilde (e.g. &#WORD~), this character serves as a delimiter and is NOT transmitted to the questionnaire page thereby allowing the absence of spacing between the ercall and the text that follows it..

Advanced features

Recalled values are inserted within HTML <SPAN> markers to give them the SUBSTITUT style. This can interfere with the proper display of some recalled values — particularly if the recalled values are placed within hyperlink marks. To avoid the addition of the SUBSTITUT style, insert a tilde character (~) between the recall symbols and the variable name as in the following:

    % Question text
    [EN]Earlier, you mentioned that you are generally considered a &~Q1? Was it always the case?
    [FR]Vous avez mentionné plus tôt que vous êtes généralement vu(e) comme un(e) &~Q1? Est-ce que cela a toujours été le cas?

It is possible to recall any variable available in the Perl environment as part of the CallWeb script (see the context data, in particular). The recall syntax is then {$variable}. For example, the following page header would cite the current case access code:

    # HEADER EN = Your case access code is {$_telkey}

Recalled values may contain recalls. For example, the following instruction is valid and will recall the _telkey value using &#TELKEY:

    # Recall TELKEY = {$_telkey}

There is yet another type of recall (although it is more than a simple recall). Any Perl expression (not only variable names) can be displayed where substitutions are allowed using the following syntax:

    <EXECUTE>Perl expression</EXECUTE>

Using this syntax, one can display the result of complex calculations without having to store them in a CallWeb question field.

Also, it is possible to calculate the result of a recall into a question or as part of an EXECUTE tag. See the "substitue" function on the computed questions page.

Finally, here is a specialized type of substitution: <crypt>text</crypt>. The text between these tags is encrypted using the cover function. There is a special application of this type of substitution. Options inserted in CallWeb questionnaire URLs can be obfuscated using syntax like the following:

    http://somedomain.com/cwx.cgi?_crypt=<crypt>_proj=THISPROJECT&_telkey=SOMETELKEY</crypt>

which produces

    http://somedomain.com/cwx.cgi?_crypt=0648090e3706020808253b346d0370622a45362a172e1a13380e0e123916016c1f322319

Used in an e-mail invitation, for example, CallWeb encodes the value between <crypt></crypt> tags and associates it to the _crypt URL option. This option is decompressed by CallWeb to recover the initial options and values that the encrypted text contains. It is possible to encrypt only a portion of the URL options if there are advantages to doing so.