Variables normally get their values from the answers users enter during an interview, but sometimes you may want to assign an answer to a variable instead of allowing the user to specify the answer.
For example, a document might include the address of the client and, in another place, the address of the client’s spouse. Once the client’s address has been entered by the user, you could use a SET instruction to automatically fill in the same address for the spouse, since it will be the same.
SET instructions are inserted using a Computation variable, which you can insert in the template where you want the SET instruction to take effect.
You should never SET a variable's value and then cause the variable to be asked later in the template. If you do this, the value assigned by the SET instruction will always overwrite users' answers. If you want to suggest an answer for users but allow them to change it, use the DEFAULT instruction. (See DEFAULT VAR TO VALUE instruction model and Differences Between SET and DEFAULT Instructions.)
To set two or more options for a Multiple Choice variable, separate each option with a vertical bar (for example, SET MC Variable TO "Option1|Option2|Option3").
If you intend to SET values for all the variables in a repeated dialog, you should make sure the Trim endmost iterations whose answers are grayed or hidden option is turned off for that dialog. Otherwise the dialog’s COUNT and/or the number of repetitions that show up in the interview outline may be unpredictable.