simple-complexity

Complexity Through Simplicity

Document Services

Complexity Through Simplicity

By Seth Hanisek

One of the most common experiences I have as a HotDocs trainer is to take someone through the fundamentals of HotDocs template development (confirming that they understand and are comfortable with variables, repeats, etc.), and have them show me something like this:

Investors

Shares Owned

Abraham Consolidated

150 Ordinary shares at £15.00 per share

250 A shares at £9.50 per share

Bramble & Bottletop LLC

25 A shares at £1.00 per share

15 C shares at £0.75 per share

Cooperative Crankshafts

500 Ordinary shares at £15.00 per share

375 A shares at £1.00 per share

400 B shares at £0.10 per share

They become distressed and proclaim “I can do basic template development, but I don’t know how to do… that!”

It is a common experience because not many people are trained to look at problems like a programmer or an engineer. But everyone deals with complexity in other parts of their life, and this is no different. The solution is the same whether you are talking about rebuilding an engine, or cooking a three-course meal, or developing a complex template.

Keep It Simple

The best way to tackle any big job is to break it into smaller, more digestible chunks. Let’s look at our example again:

Investors

Shares Owned

Abraham Consolidated

150 Ordinary shares at £15.00 per share

250 A shares at £9.50 per share

Bramble & Bottletop LLC

25 A shares at £1.00 per share

15 C shares at £0.75 per share

Cooperative Crankshafts

500 Ordinary shares at £15.00 per share

375 A shares at £1.00 per share

400 B shares at £0.10 per share

It looks like we need a list of Investors, and for each Investor there will be a list of different types of shares at different prices. There is a lot going on here, but we can start with the simplest task: make some variables. Variables will be needed whatever we do, so let’s begin there:

Investors

Shares Owned

«InvestorName»

«ShareNumber» «ShareName» shares at £«SharePrice» per share

«ShareNumber» «ShareName» shares at £«SharePrice» per share

«InvestorName»

«ShareNumber» «ShareName» shares at £«SharePrice» per share

«ShareNumber» «ShareName» shares at £«SharePrice» per share

«InvestorName»

«ShareNumber» «ShareName» shares at £«SharePrice» per share

«ShareNumber» «ShareName» shares at £«SharePrice» per share

Of course this is a list, so we can remove redundant rows – but we will leave the list of shares alone for now because we want to stay simple and concentrate on the list of Investors:

Investors

Shares Owned

«InvestorName»

«ShareNumber» «ShareName» shares at £«SharePrice» per share

«ShareNumber» «ShareName» shares at £«SharePrice» per share

As with all lists, the Investors will be set up as a repeated dialog (called Investors). This dialog will (for now) only contain the Investor name, as that is the backbone of the list. Now our table looks like this:

Investors

Shares Owned

«REPEAT Investors»«InvestorName»

«ShareNumber» «ShareName» shares at £«SharePrice» per share

«ShareNumber» «ShareName» shares at £«SharePrice» per share

Nesting Instinct

So far, all we have done is create some variables and repeat a row in a table – all basic concepts covered during the first day of HotDocs training. Now we can start to add complexity in layers. The first layer is that list of shares, which is also a repeated dialog. However, this is a list within a list; each list of shares and prices will be different for each Investor. What we need is a nested repeat:

Investors

Shares Owned

«REPEAT Investors»«InvestorName»

«REPEAT Shares»«ShareNumber» «ShareName» shares at £«SharePrice» per share

«END REPEAT»

Our nested repeat dialog (called Shares) should contain the ShareNumber, ShareName and SharePrice variables. It should then be added to the contents list of the Investors dialog. Remember, when you use nested repeating dialogs, your nesting of the components must mirror the nesting of the REPEAT fields.

Note that the nested repeat has an END REPEAT instruction while the top-level repeat (i.e. Investors) does not. This is because a REPEAT that covers an entire row does not use an END REPEAT, but one used within a cell of a table does.

No Limits

We now have a functional version of this table. There are a number of other enhancements we can make to this project such as adding dynamic labelling to the repeated dialogs, creating a dynamically updated list of types for the shares, and calculating totals. The key thing to embrace when tackling tasks like these is to break the problem into its smallest, most digestible parts and take them one at a time.

“A journey of a thousand miles begins with a single step.”

Laozi, Tao Te Ching

If you would like to organise some HotDocs template development training for your team, or find out more about using HotDocs for document production in your business, please just contact us.