Counting the Number of Entries in a List
You can use a computation script to determine how many times a user answers a repeated dialog. You can also use an Other Expression variable to number a list.
To determine the number of entries in a list
- Create a Computation variable containing the expression COUNT( DIALOG ).
- Replace the DIALOG placeholder with the name of the repeated dialog.
- Optionally, insert this Computation variable wherever you want the number of entries to appear.
You don't have to insert the Computation variable in the template. Often, template developers use the COUNT( DIALOG ) expression as a way to keep track of the number of answers, without ever inserting the actual number in the template, by referencing it in other computation variables.
To number a list automatically
- At the template, position your cursor before the variable in the list you want to number.
- In the HotDocs Field Editor, from the Action list, select Add a placeholder.
- In the Placeholder type list, click More; then in the Computed values group, click Other Expression.
- In the Expression field, type COUNTER.
- Click Add Field.
- Add any punctuation or spaces you want to go with the number.