FORMAT( VALUE, "EXAMPLE" )

Placeholder Tooltip Replace With
VALUE v: Value Any Number, Date, or True/False variable
"EXAMPLE" example: Text A format example (in quotation marks) you want used with the value. Must be in a format HotDocs can recognize.

Returns a Text value

Sometimes you may need to add a date, number, or true/false value to a text value. You can do this by formatting the date, number, or true/false value as text.

For example, perhaps you want to create a list of items with their associated monetary values. Because these two values are different in nature, they cannot be added together without first representing the number value as a text value:

""

REPEAT Purchase Information

RESULT + Item Name + ", " + FORMAT( Item Amount, "$9,999.00" ) + "

"

END REPEAT

In this script, HotDocs first sets the computation value to nothing. Then HotDocs repeats Purchase information and then places the answers for both Item Name and Item Amount (which is formatted to appear as a text value) in the same text string, separated by a comma. If Purchase Information is answered more than once, HotDocs manually inserts a hard return (as shown before the END REPEAT) to create a column of amounts.