Masks

In a Command Center questionnaire, there are two major types of mask with their corresponding roles:

  1. Input mask: This type is used to force or filter user input to conform to a particular pattern or range.

Note: When using an Input mask the question must not have Choices.

  1. Function mask: This type does not filter user input but is used to access or launch specific functions and external programs from the question.

User-defined input masks

In some cases, when special data is needed, i.e. that cannot be described exhaustively with choices, you can create a user-defined mask i.e. a string describing a required entry pattern. It is a combination of any character(s), which must be entered by the interviewer, and the following wild characters:

Examples:

During the interview, the mask:

AA99-Z

would accept the responses:

XY87-9
ZZ00-C

 

 

but would not accept:

8987-9
ABCD-A
XY87 9

A mask for a North American phone number would be:

999-999-9999

 

 

A BLANK mask means "no mask".

Pre-defined input masks

The pre-defined masks can be accessed from a cascading list. To display this list, right-click in the Masks field, from the Question tab:

Mask

String

Function

Real number

$R.nnn

Formats a real number to nnn decimal places; the entry will be right justified and filled with leading blanks.

Example: For an amount in dollars and cents: $R.2

$R.nnn mmm nnn

 

Formats a real number within lower and upper bounds.

Example: For an amount in dollars and cents, ranging from 1 dollar and 50 cents to 10 dollars: $R.2 1.50 10.00

Note: Avoid using recalls to set the bounds

Integer number

$E

Integer number < 32768

Example: age, number of times etc.

The entry will be right justified and filled with leading 0’s.

$E nnn mmm

Integer number within lower and upper bounds.

Example: for an age between 12 and 75: $E 12 75

Date

$D

Date with yyyymmdd, yymmdd or mmdd format, depending on the code width (8, 6 or 4).

Note: If data is imported into a question using this mask it must be in yyyymmdd format.

$D nnn mmm

Date within specified bounds. Example: $D 20030501 20030615

Calendar

$C

Displays a pop-up calendar from which you can select a date.

Postal Code

France
Canada
USA short
USA long

Displays the postal code using French format.
Displays the postal code using Canadian format.
Displays the postal code using American short format.
Displays the postal code using American long format.

Time of day (not in the menu)

$H

Displays a pop-up clock from which you can select a time.

Email address

$@

Checks that the address conforms to the format of an email address.

Computed questions:

  • A mask used in a computed question is ignored.

  • Questions used as arguments in a computed question should be configured with a $R or $E mask.

  • For the result of a computed question to be a real number (with decimals), at least one of the questions in the fomula must be configured with a $R mask.

 

Function masks

The Function masks can also be accessed from a cascading list. To display this list, right-click in the Masks field, from the Question tab:

Mask

String

Function

Selection

$S

See Selection

Performs single/multiple selection of choices based on complex criteria. See Selection.

Send email

$SENDMAIL

See $SENDMAIL mask

Sends an email. See $SENDMAIL mask.