This tip covered the expression models: ANSWERED(VAR) and ANSWERED(DIALOG). Most often these are used in templates, but they are also used in computations to test whether a variable or a dialog has been answered. Hotdocs scripts will be interrupted if the value of any required variable is not known. For this reason, the use of the"answered" function gives a value where no value is known.
Expression Model: ANSWERED(VAR) and ANSWERED(DIALOG)
Instruction Model: AGE(DATE)
This tip covers the instruction model: AGE(DATE). Use this expression if you want to know the age in terms of years as of the current date. If you want to know the age as of a specific date, other than today, then you will need to use YEARS FROM( DATE , DATE )
Instruction Model: ABSOLUTE VALUE(NUM)
This tip covers the instruction model: ABSOLUTE VALUE(NUM). This model returns the positive (or absolute) value of a number variable. In some accounting formulas, the result of the formula will be a negative number. You may want to not the value as a negative, but still be able to treat and format the number based on its positive value
Instruction Model: ZERO(NUM)
This tip covers the use of the instruction model: ZERO(NUM). When is a number not a number? When it has no value. That doesn’t present an issue unless you start running calculations based on an unanswered number. The solution is ZERO(NUM).
Correcting Bloated Images in RTF Templates
HotDocs, DealBuilder and GhostFill all work with RTF Templates. On occasion, a template may include an image for a watermark, a logo, or some other purpose. Thanks to an ingenious feature of Word, when you some a document to rich-text format (RTF) the images are converted to a useless, but huge windows metafile. This ensures compatability with ANCIENT word processors, but does nothing for you. In fact, a simple company logo can expand the size of a short letter from 20K, to 1,200K (or 1.2 MB). And that is before you start adding text. The solution is a simple change in the registry for WORD on each machine.
Limit Spreadsheet Lines Appearing
You want to control the number of lines that appear on a dialog that displays in “Spreadsheet” style. Quite often, the default number of lines visible on a spreadsheet style dialog are aesthetically offensive. We need to control this for two reasons: 1) its ugly; and 2) screen real estate is quite often at a premium.
Instruction Model: ADD TEXT TO MULT_CHOICE
This tip covers when to use and how to use the HotDocs Instruction Model: ADD TEXT TO MULT_CHOICE. HotDocs supports dynamic multiple choice variables. A list of options (and their associated prompts) for a multiple choice variable can be seen in the definition of a particular component. However, this restricts the user to options known at the time that a component file is authored. This instruction model lets the developer dynamically change the option values and their associated prompts based on answers given by the user during an assembly.
SET Command and GRAYed Variables
You need to SET the value of a variable, but want users to be able to edit the value even after it is SET. HotDocs will GRAY a variable (prohibiting editing) if the SET command is processed on the dialog, and DEFAULT will not overwrite a variable’s value.
A “regular” script to SET a variable to a value (based upon a Multiple Choice variable) probably looks something like this:
IF ANSWERED ( Var_MC )
IF Var_MC = “1”
SET Var1_TE TO “red”
ELSE
SET Var1_TE TO “blue”
END IF
END IF
As soon as Var_MC is answered, Var_TE will acquire an appropriate value, and subsequently GRAYed out - because it is processed dynamically by the dialog script, and whilever those conditions are met, the variable will not be editable.
Adding Spacing to Dialog Elements
When working with Dialog Elements, particularly Horizontal Lines, you may wish to add a line (or vertical space) before the dialog element. You COULD add a separate dialog element for the spacing. But that adds to your scripting and dialog management. Instead, you should add a <.pm> Code before and after the Prompt for the Dialog Element.
Convert Time Matters Date to a HotDocs Date
Dates in Time Matters display as Dates on the Matter form. But, they are actually stored as Numbers. When you bring them into HotDocs via the Database Connection or Active Integration, you get a number, and not a date. This solution is courtesy of Bart Earle. Dates are stored as the number of Days from December 28, 1800. The solution is to create a computation that takes that number and converts it into a date that can be used and formatted by HotDocs.
Statistics
Page Views: 20357
Page rendered in 1.0430 seconds
34 queries executed
Total Entries: 82
Most Recent Entry: 07/16/2008 11:19 am
Total Members: 5
Total Logged in members: 0
Total guests: 8
Most Recent Visitor on: 11/22/2008 01:26 am
Most visitors ever: 87 on 11/07/2006 02:22 pm