GRAY ALL; GRAY VAR; UNGRAY ALL; UNGRAY VAR

PlaceholderA marker in an instruction or expression model that indicates where a value must be substituted. This value must be a literal value or a variable. Instruction and expression models help the developer use the correct syntax in a script. Replace With
VAR Any variableA component that is used to represent changeable text (such as names, dates, numbers, etc.) in the template. Types of variables include Text, Date, Number, True/False, Multiple Choice, Computation, and Personal Information. used in a dialogIn template development, represents the component in which the developer groups variables and other components. In document assembly, represents the group of questions in the Interview tab of the assembly window where users enter their answers.

These instructions, which are used in a dialog scriptOne or more instructions and/or expressions that generate a value or execute some kind of procedure., control whether components in a dialog appear grayed or ungrayed, depending on answers a userThe customer, client, or person who assembles documents from templates. (See also template developer.) enters. GRAYAn instruction used in a dialog script to disable a variable unless the user answers another variable a specific way. For example, questions asking for children's name can be grayed until the user answers a question indicating he or she has children. (See also UNGRAY.) ALL dims all components in the dialog, while UNGRAY ALL makes all of the components active again. Likewise, GRAY VAR dims a single componentA template resource file that displays or stores information about the user input/answers to merge in the final document. Examples of components include variables, dialogs, dialog elements, merge text groups, and formats., and UNGRAY VAR enables the component again.

For example, say you want certain variables in a dialog to appear based on the user's family situation. How the user answers the Multiple Choice variable, Family Status, controls which questions are asked:

GRAY ALL

UNGRAY Family Status

IF Family Status = "Married, with children"

UNGRAY ALL

ELSE IF Family Status = "Married, no children"

UNGRAY Spouse Name

ELSE IF Family Status = "Separated, with children"

UNGRAY Number Of Children

END IF

The initial GRAY ALL instructionA command in a script or template that performs a special task, such as inserting a template or asking a dialog at a specific place in the interview. dims all variables in the dialog, making them inactive. Then the Family Status Multiple Choice variable is immediately ungrayed so the user can choose an option. Depending on the answer to this Multiple Choice variable, some or all of the other variables are ungrayed.

In the script above, you could also gray each variable in the dialog (except the Multiple Choice variable); however, graying all of the variables and then ungraying the Multiple Choice variable immediately after saves a lot of repetitive typing.