HotDocs Tips & Tricks

Tips, tricks and solutions with the HotDocs document assembly platform
Wednesday, January 28, 2009

CLEAR MULT_CHOICE


Unfortunately, the CLEAR instruction model doesn’t really have any use on its own.  Its job is simple: to remove all the options and option prompts from the specified multiple choice ("MC") variable.  That’s it.  When used in conjunction with the ADD instruction (which adds options & option prompts to a specified MC variable), you end up with a pair of commands that can dynamically build MC variables on the fly, based on whatever data you desire.

For the sake of this example, lets say we are drafting real estate documents.  We have BORROWERS RPT, which collects information on...well, borrowers!  We have BORRS Full Name CO which constructs the full name of each individual borrower (ie: can only be used inside the repeat).  Lastly, we have BORRS Guaranteed MS, which is a multi select MC variable which asks which borrowers have guarantors.  Here’s how we’d build our BORRS Guaranteed MS variable:

CLEAR BORRS Guaranteed MS
ASK NONE
REPEAT BORROWERS RPT
 ADD 
"«BORRS Name Full CO»" TO BORRS Guaranteed MS
END REPEAT
ASK 
DEFAULT

That’s it.  We firstly clear the MC variable, then inside an ASK NONE/ASK DEFAULT pair, we add the full name of each borrower to the MC variable.  The user may now select borrower names from the MC variable for insertion into the template.  In conjunction with the list format applied to the variable, you can quickly and easily generate user-specified lists of any data from any repeat you have in your system.

There are far more uses for CLEAR/ADD, but this covers what we consider to be the most useful one.

Posted by Ian Burrows
Page 1 of 1 pages

Statistics

Page Views: 18058
Page rendered in 0.3912 seconds
34 queries executed
Total Entries: 154
Most Recent Entry: 03/12/2010 07:07 pm
Total Members: 5
Total Logged in members: 1
Total guests: 14
Most Recent Visitor on: 03/12/2010 07:14 pm
Most visitors ever: 46 on 03/04/2010 11:35 am