INCREMENT NUM_VAR; DECREMENT NUM_VAR
Placeholder | Replace With |
NUM_VAR | A Number variable |
The INCREMENT and DECREMENT instructions cause HotDocs to increase or decrease a number variable, usually a counter , by the value of 1.
In the following example, you want to create a list 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 instruction 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