HotDocs_Online.Value Object

A Value is the most basic building block of a HotDocs Answer. This is where individual pieces of data, such as text strings, dates, and numbers, are stored. Because HotDocs allows variables to be placed in repeated dialogs, each Answer may contain one or more Values.

In addition to the data (text, number, date, or other information) stored in the value property, each Value contains four 0-based repeat indexes to indicate the position of the Value within the HotDocs Answer. Any unused indexes should be set to -1. For example, if a variable is not repeated, its Answer would contain only one Value with the following four repeat indexes:

-1, -1, -1, -1

For a repeated or nested variable, the indexes must indicate the position of the Value in relation to all other Values that make up the Answer. The following table shows the repeat indexes for a simple repeated variable that contains the names of the first three Presidents of the United States:

value RepeatIndex1 RepeatIndex2 RepeatIndex3 RepeatIndex4
George Washington 0 -1 -1 -1
John Adams 1 -1 -1 -1
Thomas Jefferson 2 -1 -1 -1

For a more complex example, review the next table, which lists the children of each President named in the previous table. A single Answer would contain all 12 Values. For each Value, the first index corresponds to the child's parent (siblings share the same first index), and the second index is the child's birth order. Because this example contains answers nested only two levels deep, the last two indexes are -1, which indicates that they are unused:

value RepeatIndex1 RepeatIndex2 RepeatIndex3 RepeatIndex4
John Parke Custis 0 0 -1 -1
Martha Custis 0 1 -1 -1
Abigail Amelia Adams 1 0 -1 -1
John Quincy Adams 1 1 -1 -1
Susanna Adams 1 2 -1 -1
Charles Adams 1 3 -1 -1
Thomas Boylston Adams 1 4 -1 -1
Martha Washington Jefferson 2 0 -1 -1
Jane Randolph Jefferson 2 1 -1 -1
Mary Wayles Jefferson 2 2 -1 -1
Lucy Elizabeth Jefferson I 2 3 -1 -1
Lucy Elizabeth Jefferson II 2 4 -1 -1

Interface Information

ProgID: HotDocs_Online.Value.10.1
Version Independent ProgID: HotDocs_Online.Value
CLSID: {1050B549-FABC-4C7A-BE75-E626515FC479}
_Value Interface: IID: {38861DDA-B04D-4BB5-A8F1-9D45C0D29AB4}
_ValueEvents Interface: IID: {BA844551-889B-4D64-B250-7EAF262726B4}

Properties

Property Desciption
Answer [Read/Write] This property specifies the Answer object to which the Value belongs. (Each Answer object contains one or more Value objects, but each Value belongs to only one Answer.)
repeatIndex1 [Read/Write] This property specifies the first repeat index for the Value. For non-repeated variables, this index is -1.
repeatIndex2 [Read/Write] This property specifies the second repeat index for the Value. For non-repeated variables, this index is -1.
repeatIndex3 [Read/Write] This property specifies the third repeat index for the Value. For non-repeated variables, this index is -1.
repeatIndex4 [Read/Write] This property specifies the fourth repeat index for the Value. For non-repeated variables, this index is -1.
Value [Read/Write] This property specifies the "value" of the Value. In other words, this would be the actual string of text, number, or Boolean value that a user entered for an Answer at the specified repeat indexes. The type of object returned corresponds to the type of data stored in the value. For example, a Number variable would return a number object and a Text variable would return a string. Multiple Choice variables, on the other hand, may return either a string or an array of strings depending on whether or not the variable allows multiple selections.