top of page

12. Returns in Text Strings


How to place a Return (Line Feed, New Line, Carriage Return) in a text string or create multi-line output



"\r" within your computation will create a soft return. For example:

"Bob Johnson\r123 Main Street\rAnytown, USA 88897"

will produce:

Bob Johnson
123 Main Street
Anytown, USA 88897

Alternative: Enclose the Return within quotes, as follows:

Name + "
" + Address + "
" + CityStateZip

Notice that there are Returns included between the quotes.

The "tricks and techniques" to which [List Member] refers (and which are undocumented in the HotDocs manuals) are called "escape sequences". They are primarily used to put non-printable characters that execute actions in an output stream, and date back to the very earliest days of computers, key punch machines and line code (carriage return has a specific meaning here!). I have tested all the escape sequences (there are 10 of them) available and found that only two (\r for carriage return, and \t for horizontal tab) work in HotDocs. This would suggest that they were specifically programmed into the HotDocs code at some time in the past by some programmer for an unknown reason. They are undocumented because they were unknown until someone tried one and after finding it successful, posted it to the HotDocs list. They will remain undocumented, and therefore, unsupported if something changes in HotDocs to inadvertently mess them up.

So, there you have it. Two escape sequences that may be used in computations and Multiple Choice merge text to insert either a soft return (\r) or a horizontal tab (\t) in the outputted text.

bottom of page