Placeholder | Replace With |
computation_var | Any Computation variable in the model that results in a true or false value |
The filter instruction filters out certain entries from a repeated list, based on conditions you specify.
In the following example, the script filters out all corporate entities from a list of vendors:
""
repeat VendorInformation
format "A, B, and C"
filter NoCorporateVendors
result + VendorName
endRepeat
In the preceding script, NoCorporateVendors is a Computation variable with the following script:
VendorType != "Corporation"
First, the empty quotation marks set the value of the repeat to "nothing." HotDocs then repeats the VendorInformation dialog. After the user enters all the information, HotDocs processes the responses, filters out all corporate entities, and displays a modified list in the specified format.
You can use the and operator in the computation to filter out entries based on two or more conditions.
A filter can be as complicated as it needs to be, but it must result in either true or false. For example, the expression yearsFrom( ChildBirthDate, today ) produces a number (the age of a person), not a true or false value—it is not a filter. But the expression yearsFrom( ChildBirthDate, today ) <= 17 can only result in true or false. It can correctly filter all children under the age of 18 from a list.