Home > Blog > Getting Most Out Hotdocs Number 2

Getting the Most out of HotDocs: Number 2

Getting the Most out of HotDocs: Number 2

Holli Hamilton

January 28, 2016

Second in the series of handy hints for HotDocs details how a little scripting can go a long way in ensuring the finished document is completely accurate.

Using COUNT to make sure that the correct plurals are in a document

When you are creating a template which includes a repeated dialog, you often don’t know whether the user will end up adding one or multiple instances to the final document. This makes it hard to know whether the text surrounding the list should be talking about singular or plural.

For example, say you are creating the template for a will and you need make a list of any children the client has. You can use a repeated dialog to allow them to add as many names as necessary but now the rest of the language in your template may need altered depending on where there are one or more children. For example, you could be using “the child is entitled to…” for one child or “the children are entitled to…” for multiple. To avoid having to make this change manually, you can use a little bit of HotDocs scripting to create a computation that inserts the correct version each time.

Using the expression COUNT allows HotDocs to calculate how many children there are by counting the number of times the user answered the repeated dialog in the interview. You can put this into a small computation that tells HotDocs that if the repeated dialog is answered more than once to insert the text “children are” otherwise to insert “child is”. Replace all instances of “child is” in the text with that computation and now you won’t have to worry about correcting singular or plural text again.

Here’s the basic method for this example:

1.       Create a new Computation and type in the following script:

""

IF COUNT(ClientChildren) >1

"children are"

ELSE

"child is"

END IF

(In this example ClientChildren is the name of the repeated dialog used to gather information about any children.)

2.       In the template, replace any instance of “child is” or “children are” with the computation.

If that script seems complicated, try speaking it out loud “If count ClientChildren is greater than one “children are” else “child is” end if”. That’s a condensed version of how you might say it to a person: “You’re creating some text. If you count more than one ClientChildren, write “children are”, otherwise write “child is. That’s it.” The double quotations ( "" ) at the beginning of the script are doing just that, informing HotDocs that you want it to output some text, and the “END IF” at the end is telling it that you have stated all the allowed options.

Now that you have the basic structure of using a computation like this to insert variations of text you could use it for any number of applications that require a plural.

 

Add new comment

Blog Latest

How Law Firms Can Benefit from Key Features in HotDocs

Are you making the most of HotDocs? Here are five great features that make it more...Read more

Creating Multi-Language Documents with HotDocs

Today, more than a million end-users throughout 60 countries use HotDocs daily to generate...Read more

One Proven Way to Make a Profit with Alternative Fee Arrangements (AFAs)

Alternative Fee Arrangements (AFAs) are increasing in prevalence and there is no question,...Read more

With more than 1 million users in 11,000 companies across 60 countries,
you’ll be in great company when you deploy HotDocs.

Schedule a Demo

  • RBS uses HotDocs document automation software
  • XL Insurance uses HotDocs document assembly software
  • Orrick, Herrington & Sutcliffe uses HotDocs document assembly software
  • ECE
  • Lockmann Krane uses HotDocs document automation software
  • Caltrans uses HotDocs document assembly software