homefeaturesexamplesDOCUMENTATIONblogpricingcontact us
technical documentationCATI documentationcookbookrobot

Appendix H

TEST pound instruction

The TEST pound instruction defines a logical test which triggers an error message. This generic statement comes in addition to CallWeb built-in tests such as tests on the minimum and maximum number of responses, on the coherence of the selection of answers, on MUST conditions, on table conditions, etc.

Syntax:

    # Test ID = [TRIGGER]trigger [CONDITION]condition [MESSAGE]message [TYPE]type
    or
    # Test ID = [SUR]sur [CONDITION]condition [MESSAGE]message [TYPE]type

Where

ComponentDescription
IDis any character string identifying the test. It is used within the <TEST> tag if the test has a "tag" [TYPE] (see below)
triggeris the name of the question which triggers the test. The test is triggered when an answer to this question is found in a page sent to CallWeb. The question should be one that always appears on screen and that requires an answer to ensure that the test takes place.
conditionis a logical condition describing an error. It can be in xbase syntax (in which case it will be tested during compilation) or in Perl syntax if within braces.
messageis the text of the message to insert if the condition is true (i.e., if there is an error). Different linguistic versions may be defined by inserting [xx] codes using ISO language codes. Recalled values may be used in the message.
typespecifies the type of error message and where to put it on the CallWeb page:
  • [TYPE]QUESTION puts the message where a system message would be if question "trigger" was faulty (above it outside of a table; on the right within a table)
  • [TYPE]TABLE or [TYPE]TABLEAU puts the message before the table to which the "trigger" question belongs
  • [TYPE]TAG puts the message where the <TEST>ID</TEST> mark is located on the page (there must be no spaces from the beginning to the end of this TEST string); this may be anywhere, such as in a response category label (which would show at the top of a column in a table) or in a NOTE field (which would show in the left column in a table)

Any given question may trigger more than one test.

Examples:

    # Test ABC =
    #> [TRIGGER]AQ1
    #> [CONDITION](AQ1+AQ2+AQ3).NE.100
    #> [MESSAGE][EN]Please make these total 100[FR]Veuillez vous assurer que ces valeurs totalisent 100
    #> [TYPE]table

This will display the error message above the table to which AQ1 belongs if the 3 responses don't total 100.

    # Test DEF =
    #> [TRIGGER]Q10
    #> [CONDITION]Q5.AND.Q6.AND.Q7.AND.(.NOT.Q8.AND.NOT.Q9)
    #> [MESSAGE][EN]Please answer Q8 or Q9 since you have answered Q5, Q6 and Q7[FR]Veuillez répondre à Q8 ou Q9 puisque vous avez répondu à Q5, Q6 et Q7
    #> [TYPE]question

This will display the error message above Q10 if Q5, Q6 and Q7 were answered while Q8 and Q9 were not. Note that questions Q5 to Q9 need not be on the same CallWeb page as Q10.

   

e-mail technical support!