Text, Number, Date, and TF Variables: "«Variable[Repeat Level]:'Fill Char',<>Fill Count,""Unanswered Text"":Format Example»" "«TextVar[1]:'#',>10,""_______________"":LIKE THIS»" "«NumVar:'*',<10,""$___________.___"":Nine Dollars»" "«DateVar:' ',<0,""___/___/2001"":6/3/1990»" "«TFVar:'*',>5,"""":yes/no»" Multiple Choice Variables: "«Variable[Repeat Level]:'Fill Char',<>Fill Count,""Unanswered Text"":Merge Text:Format Example»" "«MultChoice[3]:'*',>10,""Unascertainable Gender"":male/female:LIKE THIS»" Omitting Elements "«TextVar:' ',<0,""__________"":LIKE THIS»" "«TextVar:' ',<0,""__________""»" "«TFVar:'*',>5,"""":LIKE THIS»" "«TextVar:LIKE THIS»" "«TextVar»" "«MultChoice:' ',<0,""__________"":him/her:LIKE THIS»" "«MultChoice:' ',<0,""__________"":him/her»" "«MultChoice:' ',<0,""__________""::LIKE THIS»" "«MultChoice:'*',>5,""""::LIKE THIS»" "«MultChoice:him/her»" "«MultChoice::LIKE THIS»" "«MultChoice»"
When you use a variable in a document or template, any optional elements you choose for the variable are automatically placed after the variable name. But when you are working in a computation these elements cannot be inserted automatically. They must be added manually. These examples show what options are available and how to place them.
The basic options for all variables are:
Multiple choice variables have one additional option: Merge Text, which is further explained in Computation #0054, Referencing Multiple Choice Merge Text.
The options are placed as shown in the examples above. Note first that the variable must be used within chevrons and inside of double quotes: "«Variable»". Look particularly at the examples for omitting elements. If either fill characters or unanswered text are used, the other must be present as well, even if left blank. This is because they are all part of the same grouping, meaning that they all come before the first colon. The examples show how to leave one or the other blank.
The following are also worth noting:
Repeat Level. The Repeat Level is always optional. When used, it can either contain a number or a number variable. For example, TextVar[1] TextVar[NumVar] TextVar[COUNTER]. Spaces can be added before or within the square brackets to make it more readable: TextVar[ COUNTER ] TextVar [COUNTER].
Fill Character & Fill Count. The Fill Character is always placed in single quotes and followed by a comma. Make sure that the comma is outside of the quotes. The Fill Count is preceded by either a "greater than" > symbol, meaning Pad Right, or a "less than" < symbol, meaning Pad Left (the default). To leave Fill Character and Fill Count blank (when using Unanswered Text), always use two single quotes with a single space between and a "less than" < symbol followed immediately by a zero: '',<0.
Unanswered Text. When HotDocs creates the Unanswered Text option it places it between double quotes: "Option". But because we are placing the Unanswered Text within a quoted string in a computation, we must use two sets of double quotes: ""Option"". This is explained, with a caveat, in Computation #0032, Using Quotation Marks in a String. But there is an easier way. As long as your unanswered text does not contain any punctuation that might throw HotDocs off (such as commas or colons), omit the quotation marks altogether: "«TextVar:'',<0,_________:LIKE THIS»". As a rule of thumb, if HotDocs can clearly identify the text between the comma and the colon as unanswered text, it will not require you to use the quotation marks.