Back to List
Placeholder | Replace With |
var | A repeated variable |
The ascend instruction sorts lists of answers (gathered using a repeat instruction) in alphanumeric order, from 1 to 9, and from A to Z. The descend instruction sorts lists of answers from 9 to 1, and from Z to A.
For example, the following script would insert a list of clients in alphabetical order, from A to Z. Even though it lists First Name TE first, it sorts by Last Name TE:
""
repeat ClientList
ascend LastName
result + FirstName + " " + LastName + "
"
endRepeat
The first empty set of quotation marks sets the computation value to nothing. Then, the repeated dialog, ClientList, asks for each client’s first and last name. Next, the ascend instruction sorts the list of names by last name. Finally, the result expression tells HotDocs to merge the names in the document.
Back to List