INCREMENT NUM_VAR; DECREMENT NUM_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
NUM_VAR A Number variableA type of component that merges a numeric value in the document.

The INCREMENT and DECREMENT instructions cause HotDocs to increase or decrease a number variable, usually a counterAn expression that keeps track of the current number of repetitions in a repeated dialog. Each time a new repetition is added, the COUNTER is increased., by the valueIn an interview, it represents a user's answer. In a script, it represents data that must be used in executing the script. (The value can either be a literal value or a user's answer.) of 1.

In the following example, you want to create a listTwo or more answers to one question merged in the document. of potential employees. However, you want the list to include only those applicants with four or more years of schooling. To do this, you would use the WHILE 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. to loop through a list of applicants. You would then use the INCREMENT instruction to keep track of which repetition you are on so that the correct information can be merged into a new list.

SET Applicant Count TO 1

SET Prospect Count TO 0

WHILE ANSWERED( Applicant Name[Applicant Count] )

IF Applicant Years of Schooling[Applicant Count] >= 4

INCREMENT Prospect Count

SET Prospect Name[Prospect Count] TO Applicant Name[Applicant Count]

END IF

INCREMENT Applicant Count

END WHILE