CIC Solutions Forums
Certified Independent Consultant Solutions Forums for
LexisNexis® Practice Management Products
Time Matters - PCLaw - Billing Matters - Browser Edition - HotDocs

Can Field "names" contain Variables?

rated by 0 users
This post has 12 Replies | 0 Followers

Not Ranked
Posts 0
AdoptNeed Posted: Tue, Mar 11 2008 6:23 AM

I can't crack this nut:

In several of my old WordPerfect 6.1 (1994!) merge routines, I used an ability it had that I cannot figure out how to duplicate in HotDocs.
 
What I did in WP was use a Variable <within> another code to produce a result that varied depending on what the Variable contained, like so:

Instead of FIELD( K1 Name ), my code would be like this: FIELD( KVARIABLE( Kid# ) Name ).

If VARIABLE( Kid# ) equalled "1," this would result in a calling of FIELD( K1 Name )"  But if VARIABLE( Kid# ) equalled "2," it would result in a calling of FIELD( K2Name ), and so on.

In my adoption databases, I could have 1, 2 or 3 kids at a time in my forms.  It would always run at least once with a value of "1"; and it would increment up to "2" and "3" for additional "runs" IF the adoption involved additional kids.

I can't figure out how to duplicate this in HotDocs.  I want to be able to do it because it avoids having to have separate copies of merge language for Kid1, Kid2, Kid3, etc. (not to mention Adoptive Mom, then Adoptive Dad; or Birth Dad1, then Birth Dad2, and so on --- it's not unusual to have more than one "father" of a child to be adopted!)  So, if I have to change the language in those (otherwise identical) slabs of merge text, I can do it in just one place rather than remembering (or hoping to remember) to change them all, and forgetting either to do it at all, or changing some, but not all, etc.

What HotDocs command (or combination) allows this?  It's so much more powerful than WordPerfect 6.1, it HAS to be possible, but the Computation Editor doesn't seem to like the idea at all.

Thanks!

Birney www.AdoptNeed.com Adoption Law Office of Birney O'Brian Bull 420 West Broughton St. Savannah, Georgia 31412-0011 912-ADOPT-NEED
Top 10 Contributor
Posts 1,699
.CIC
BM CIC
BMP CIC
PCL CIC
TM CIC
Rather than trying to include a variable within the field you might want to look at using "repeat" dialog.

 

Caren Schwartz (Moderator/CIC)

35-45 Consulting

& Time & Cents Consultants, LLC

Southport, CT

www.3545consulting.com / www.timeandcents.com

203-254-7736

Software for Managing Time, Money & Information

Time Matters, Billing Matters, Billing Matters Plus, PC Law CIC

 

Not Ranked
Posts 0
AdoptNeed replied on Tue, Mar 11 2008 8:13 AM

Thanks, Caren!

Yeah, I was kind of afraid that some kind of REPEAT expression would be the "answer" to what I'm trying to do.

But it looks like the logic would be about as tough as my old WP 6.1 expressions!  I'm really tired of busting my head over how many IF's, ELSE's, and ENDIF's I've got!  And there was no such thing as "ELSE IF" in WP 6.1 merge language, either.  It was IF, ELSE, and ENDIF, end of story.

I had lots of passages with layers and layers of IF's and ENDIF's, with some places buried up to 7 deep in (hopefully) matching pairs of IF's, ELSE's, and ENDIF's.  "Labeling" merge codes to help make sense of them in WP 6.1 ranged from tedious to impossible --- I never bothered.

And there was no Preview option, either.  You just had to code it all up, run the merge, and hope it worked.  And when it didn't, it wasn't always easy to tell what was wrong.  You could end up in outer-Ether-land, and have no idea what sent you there. I want HotDocs to smooth out all those kinds of bumps!

Would I need to use Multiple Choice variables to make REPEAT work?  I'm having trouble getting my head around those too.  I've gotten computational variables to evaluate field contents pretty well in HotDocs so far --- but those could be things that Multiple Choice variables would be much better for!  But from the HotDocs Help and the tutorial PDF, it does look like REPEAT can do a lot with Multiple Choice variables.

(I must say also that that stuff looks ominously like Arrays of variables in WP --- another thing I never really got my head around.  I used some macros from WP macro guru Gordon McComb that used arrays, but I never *really* understood how they gave the results I was getting!)

Sorry to go on so long in response to one sentence, but well, what do you expect from a lawyer?!

Anyway, thanks very much for your help!

Birney www.AdoptNeed.com Adoption Law Office of Birney O'Brian Bull 420 West Broughton St. Savannah, Georgia 31412-0011 912-ADOPT-NEED
Not Ranked
Posts 0
AdoptNeed replied on Wed, Mar 12 2008 7:45 AM

Uhhhhh, there's an important fact here that I haven't made clear:  The trouble I'm having in thinking about how to implement the REPEAT expression is that I'm trying to draw the answer data from several different fields (several sets of fields, actually) in one Matter record in Time Matters.  If I were just building REPEATing answer dialogs for HotDocs standing alone, I would know how to do that.

But this puppy should virtually assemble itself, by itself, with no additional "answers" required of the user (that would be me, at first, and my assistant later), at assembly time.  All the data necessary for the merge should be contained in the Time Matters Matter record.

I would think a REPEAT expression could draw its first round of data from one set of fields in one data record, its second round of data from another set of fields in that same data record (same types of information about a different person), and its third round of data from yet another set of fields in the same data record.

I just don't know how to do it yet.  It, uh . . . it can be done, can't it?  What I'm afraid of is that I'll figure out some way to do it, but it will be:  A) coyote ugly from the start, and  B) require a total overhaul within a few weeks of use and/or further development, because it was clumsily designed in its early stages.

So, . . . I'll take any suggestions.  Thanks!

Birney www.AdoptNeed.com Adoption Law Office of Birney O'Brian Bull 420 West Broughton St. Savannah, Georgia 31412-0011 912-ADOPT-NEED
Top 500 Contributor
Posts 0
HD CIC

You can get the fields off the single Matter record into a repeat.  It takes some scripting in HotDocs, however.

First, create a set of non-repeating variables that will be set up to pull directly from the Time Matters record (e.g. Child name 1, Child name 2, etc.).  Create a set of repeating variables.

Second, in a computation at the top of the HotDocs template (or in your interview computation if you're using a custom interview), set the non-repeating variables to repeating ones.  For example, if your repeating child name variable is called simply "Child name", you would do the following:

SET Child name[1] TO Child name 1
SET Child name[2] TO Child name 2
etc.

You'd need to do the same with any other variables that store information about each child.

My bailiwick is HotDocs and don't do a lot with Time Matters, so I'm not sure precisely what Time Matters sends over when a field is empty.  If it sends over an empty string, you might have to do something like:

IF Child name 1 != ""
SET Child name[1] TO Child name 1
END IF
etc.

I'm assuming you don't need to have the user edit the information from Time Matters in the HotDocs interview.  If you do, it can be done, but you need some additional scripting (and you have a problem, since the data in the two locations will then be different).

 

Bart Earle, CIC HotDocs Capstone Practice Systems 231 Woburn St. Lexington, MA 02420 bart@capstonepractice.com 781-652-8419 Skype: bvearle HotDocs development and training
Top 10 Contributor
Posts 961
.CIC
BM CIC
BMP CIC
TM CIC
WS CIC

Bart Earle, one of the top Hot Docs experts gave you the solution you were looking for. I'm not a HotDocs expert by any means, but I'd like to weigh in on a common theme I've observed with the HotDocs experts and how they have been working with TM more recently.

Back in the day, using a Time Matter Case or Contact Form as the data entry form to store the data that would subsequently be used to fill a HotDocs document was common. I am guessing this is so because there wasn't too much difference between the TM Forms and the HD data forms (I am sure I am not using the correct term, but I mean the form into which you would put the variable data to create the HotDocs document). If there wasn't too much difference, and you needed much of that data in TM anyway, you might as well put it all in TM.

In the last few versions of HotDocs, I've been lead to believe that the Interviewing process has been greatly enhanced, making it more efficient to enter data directly into the HotDocs Interview Forms (again, I am sure I am butchering the lingo). This means that it may make sense to enter more of your data into HotDocs fields as part of the Interview process instead of entering it into TM. If, for example, there is no reason that you would need the data in Time Matters other than to create documents, you might as well enter it into the Doc Assembly program. The HD Interview makes it easier, more efficient, and probably more accurate. And, TM now has the capability to let you save that data within HD for future use by TM.

More importantly, as your very question points out, there are some things that you either have to do in HotDocs, or probably should. While Bart has explained how to take static (that is a key adjective as you will see in a minute) fields in TM and feed them to HD as part of a dynamic REPEAT process, the fact is that you are dealing with the data in TM statically. For example it appears that you have Kids fields. But how many? If you have 6, you don't have enough for a family larger than 6, and for the average family of 3 you are wasting 3 fields per case that could be used for something else. In other words, by using TM to store Kids names (or other similar dynamic variables that vary from Matter to Matter), you are not being as efficient as you otherwise could be if you used HotDocs that would let you enter the exact right number of Kids for each Matter.

The ultimate point is that I believe the HD experts are recommending that you carefully consider what data you put into TM v. HD, and why, as there may now be better ways to handle this. In your case, you sound as if you have a lot of TM/HD integration done, so I am not necessarily telling you to redo it all. But, for others just getting started, this is an issue to look into.

I hope some of the HD Gurus that visit here will jump in and point out where I am wrong, and give a better overview of the current state of TM and HD integration.

Thomas L. Rowe, Esq. (Tom)
CIC/Forum Administrator
For Time Matters information, Utilities and Practice Area Templates, visit us at: OTB Consulting

2009, 2010, 2012 LexisNexis Platinum Achievement Circle

Not Ranked
Posts 0
AdoptNeed replied on Thu, Mar 13 2008 8:11 AM

First of all, I can’t tell you how helpful these posts by both Mr. Earle and Mr. Rowe are!

Second, I want very much to write a few things in response to them, but, . . . and I hate to say this (especially since I don’t know much about forum software), . . . but . . .

I had a little problem in drafting this response [by which I mean, "a gigantic problem"].

The problem was that after studying these posts, and carefully drafting my response to them, for over an hour . . . I accidentally hit the Back key. [My relatively new laptop has an additional one next to the arrow keys, so it’s annoyingly easy to do.]

Anyway, one false move, and instantly, about 500 words or so — deleted. Gone forever. Oh, the praise you guys got, . . . vanished into thin, digital ether, never to be seen again.

I’m deep into sleep deficit as it is. It’s now after midnight, my time, and I just have to go to sleep. I’m going to have to wait until tomorrow to try to recreate my full response.

If I fall short in any way in that effort, I am going to exploit this chance to say now that you can’t believe how elegant and superb my praise of you both used to be!

Birney www.AdoptNeed.com Adoption Law Office of Birney O'Brian Bull 420 West Broughton St. Savannah, Georgia 31412-0011 912-ADOPT-NEED
Not Ranked
Posts 0
AdoptNeed replied on Thu, Mar 13 2008 10:34 PM

BOTH of these posts, from Mr. Earle and Mr. Rowe, are innnnnnnn-valuable! I am studying them — and how they interact and impact each other — in depth, and I’m marinating in the "sense" they make of how TM and HD "think" about manipulating data.

They DO make me want to ask a few followup questions of Mr. Earle below — and before those, a question for both or either of you (because it relates to "partnering" of TM / HD in data handling).

First I want to note that similarly valuable insight comes from Mr. Seth Rowland’s excellent explanation of ways to optimize precious "field real estate" in designing TM forms here:

http://pmforums.lexisnexis.com/forums/permalink/2498/2498/ShowThread.aspx#2498.

Back in the thread above, Mr. Rowe accurately observed: "If, for example, there is no reason that you would need the data in Time Matters other than to create documents, you might as well enter it into the Doc Assembly program." That would be a better fit for dealing with dynamic data. But it is helpful to have most of the information about the kids being adopted viewable all together on the form screens for one Matter, be it one kid, or several.

On the other hand, it’s ridiculous to have things like the residence state of my clients taking up space on the adoption Matter forms when I can only represent Georgia residents!

I haven’t committed myself to a set of fully created, interlocking, TM / HD / WordPerfect X3 templates (and their extensions in TM). I have put in some work on creating adoption type-specific Matter Forms in TM, but beyond that, I’ve mainly been poking around to see how things work and figure out what will work. So the things I’ve done on the actual HotDocs / WordPerfect X3 templates / TM extensions are mainly experiments (some of them pretty half-baked, too!).

And I want to note also that: A) I am a one attorney operation, so my margins for error and down time are razor thin, B) I am able to learn how to create these things on my own (I did similar things with the 1994 version of WordPerfect), and therefore C) [rightly or wrongly] I feel that I ought to create all this myself so that: 1) it’s exactly what I need, and 2) I will be able to make it work well (and tweak it as necessary) in the heat, chaos, and razor-thin time frames, of everyday use.

That said, I naturally want my whole system to be well-designed from the start. I definitely don’t want charge into setting things up in a way that makes sense at first, only to realize within a few weeks that it is all wrong-headed and in need of a total overhaul. (Maybe that would actually take less time overall, but I really can’t stomach the idea of working that way. So perish the thought!)

Given all this, I’m probably not going to be able to resist the temptation to go back and revise my TM forms. So here is . . .

MY FOLLOWUP QUESTION FOR BOTH / EITHER OF YOU:

Mr. Rowe’s point about static vs. dynamic data and fields is very well-taken. That sent me poking around in TM, and I found that the fields on a Custom Form can be called for a merge. So wouldn’t it be a good idea to create a separate Custom Form for each Kid (i.e., Kid1, Kid2, etc., up to 6 or 8 — 5 at once is my record so far) so that I could fill in a separate Custom Form for each kid in a given adoption, however many kids there are? And then couldn’t my HD merges dynamically load the information for however many kids there are into A) the non-repeating Child # fields, and then B) the corresponding repeating Child [#] fields?

FOLLOWUP QUESTIONS FOR MR. EARLE:

[I have tried to pose these in such detail that they can be answered with short, simple

answers like "yes" or "no."]

1. After the IF statements that would load as follows:

SET Repeating Variable [1] TO Non-Repeating Variable that

SET Repeating Variable [2] TO Non-Repeating Variable 2

etc.

Couldn’t I (wouldn’t I) then also use a WHILE expression in the template itself (or in a calculated variable for use in the template’s actual assembly), using an INCREMENTing number variable named (say) "Kid#" that would look like this:

SET Kid# to 1

WHILE Repeating Variable [Kid#] != ""

"Kid-related merge text that goes with " <<Repeating Variable [Kid#]>> "some more Kid-related merge text"

INCREMENT Kid#

ENDWHILE

2. And speaking of WHILE expressions, am I right that, syntax aside, they work like REPEAT expressions that do not ASK a Dialog? (Whereas you can control whether a REPEAT’s Dialog is ASKED or not?)

3. As to this observation of yours above: "I'm assuming you don't need to have the user edit the information from Time Matters in the HotDocs interview. If you do, it can be done, but you need some additional scripting (and you have a problem, since the data in the two locations will then be different)."

Normally, no — the information should not need editing. Generally, I don’t want relevant data to be contained only in HD, and not in TM. As such, the "write back" option would be nice if TM’s data is lacking.

I don’t know if any HD scripting would do that, but I do know that from the HD side, dialogs can be edited (on the Options Tab) to match HD variables with TM fields. That allows the "write back" option, . . . but it also results in the need to Select which data record to use at Assembly time. Well, since Assembly will be initiated from the TM Document screen of the TM Matter in question, it seems silly to have to [re]select that Matter from a list of all of them; it should be selected automatically by virtue of being initiated from the Document screen of that Matter.

So, if the TM data is lacking, I want to be able to either:

A) halt the assembly, enter the relevant data where it belongs in TM, then re-start the assembly, or

B) enter the data in the HD interview, and have it "written back" to its proper place in TM.

I apologize for asking this — because I DOUBT it is a "simply answered question" — but what’s the best way to generate those options?

4. I don’t know the difference between using "answer sources" and using a link between HD and a database. CAN a "database link" can be made with TM to use instead of simply using TM data as an "answer source"? If so, how do you do it, and which is better?

Thanks so much for everything!

Birney www.AdoptNeed.com Adoption Law Office of Birney O'Brian Bull 420 West Broughton St. Savannah, Georgia 31412-0011 912-ADOPT-NEED
Top 500 Contributor
Posts 0
HD CIC

As regards using custom forms, I would think that you would want to use a Contact form instead, perhaps with special classification code for children, but I'd defer to the Time Matters experts on the best way to do this.  If you use any solution where each child is on a separate form, things may start to get a little complicated when it comes to linking with HotDocs.

1 & 2.  Using WHILE:  In general and within its limitations, you can use WHILE as you describe, but it's a lot easier to use REPEAT in most circumstances.  WHILE can only be used in a script (dialog script or computation)--can't be used in the body of the template. Using WHILE requires that you refer to each variable with the bracketed notation that specifies the repeat index.  WHILE is intended for use in those situations where REPEAT will not work (in a dialog script, for example).  If you use WHILE, you may need to test on the ANSWERED status of a variable, in addition to or in lieu of testing on whether it contains an empty string (I am not sure what Time Matters passes over when the field is empty).

3 & 4.  HotDocs/Time Matters Links: There are three basic methods for getting data from Time Matters to HotDocs:  a.  Setting up a HotDocs template extension in Time Matters and matching the fields to the variables.  b.  Using answer sources (only works with Matter and Contact records).  c.  Using the HotDocs Database Connection to link directly to the Time Matters database.  As a general proposition, I think method (a) is preferable. It's simple to set up and use and results in Time Matters automatically creating a Document record pointing to the assembled document. If you need write back, however, you need to use (b) or (c). Method (b) is much easier to set up than (c), but (c) is useful when neither (a) nor (b) will work (when you need to get multiple records of certain types out of Time Matters, for example).

Note that you can mix any combination of the basic three methods. For example, you could use a template extension to get fields off your Matter record and then use an answer source or a Database Connection component to get Contact records.

As you noted, using an answer source requires that you select the applicable records (whereas using a template extension allows Time Matters to select records for you).  If you use writeback, there is a similar issue with the DataBase connection, although you can ameliorate the problem by automatically filtering on the records associated with a particular matter.

You can easily cancel a HotDocs assembly by clicking on the "X" in the upper right hand corner of the interview screen. Doing so and returning to Time Matters to enter the missing information is certainly an option.

 

Bart Earle, CIC HotDocs Capstone Practice Systems 231 Woburn St. Lexington, MA 02420 bart@capstonepractice.com 781-652-8419 Skype: bvearle HotDocs development and training
Not Ranked
Posts 0
AdoptNeed replied on Fri, Mar 14 2008 6:05 PM

I see I made at least stupid typo:  I have a Non-Repeating Variable named "that"!

When I put in:

SET Repeating Variable [1] TO Non-Repeating Variable that

it should lave said this:

1. After the IF statements that would load as follows:

SET Repeating Variable [1] TO Non-Repeating Variable 1

SET Repeating Variable [2] TO Non-Repeating Variable 2

etc.

(Duh!)

Birney

Birney www.AdoptNeed.com Adoption Law Office of Birney O'Brian Bull 420 West Broughton St. Savannah, Georgia 31412-0011 912-ADOPT-NEED
Not Ranked
Posts 0
AdoptNeed replied on Fri, Mar 14 2008 7:10 PM

Thanks so much, Mr. Earle, for your help!

I have to take my daughter to the St. Patrick's Day parade (Savannah) right now,

but I'll be relying heavily on your input!  Thanks!

Birney www.AdoptNeed.com Adoption Law Office of Birney O'Brian Bull 420 West Broughton St. Savannah, Georgia 31412-0011 912-ADOPT-NEED
Not Ranked
Posts 0
AdoptNeed replied on Sat, Mar 15 2008 2:40 AM
Tom Rowe:

TM now has the capability to let you save that data within HD for future use by TM.

I'm not familiar with this --- should this have said "HD" now various saving options?  Or does TM really have some way to extract data from HD?

Thanks!

Birney www.AdoptNeed.com Adoption Law Office of Birney O'Brian Bull 420 West Broughton St. Savannah, Georgia 31412-0011 912-ADOPT-NEED
Not Ranked
Posts 0
AdoptNeed replied on Sat, Mar 15 2008 8:20 PM

AdoptNeed:

Given all this, I’m probably not going to be able to resist the temptation to go back and revise my TM forms. . . .

Well, I've studied 'em again, and, for better or worse, I can't see that the "static" fields I have are "elbowing out" other fields on my Matters forms.

I have room for 3 adoptees, even though most adoptions only involve 1 adoptee. That means my forms "waste" the room for 2 adoptees in most cases (2 *areas* actually, not just 2 fields). That’s not optimal, but on the other hand, I don't really have other data I'd like to put in those areas. Particularly since doing so would mean sacrificing the presence of info about the adoptees on the Matter form. (Using Lookup links leading to a Contact or other form for the adoptees would work, but then relevant info would only be found there — where it would be harder to "dig up" than having it right on the Matter Form). So I think I’m going to leave them as is.

bvearle:

As regards using custom forms, I would think that you would want to use a Contact form instead, perhaps with special classification code for children, but I'd defer to the Time Matters experts on the best way to do this. If you use any solution where each child is on a separate form, things may start to get a little complicated when it comes to linking with HotDocs.

Mr. Earle is probably right (for reasons I don’t even know about yet), but I do want to note that HD Extensions in TM can be set up to draw on the fields in Custom Forms: File > Setup > Templates > HotDocs Template Extensions > [Relevant Tab] > [Relevant Template] > Change Record > Match Fields > Custom Fields > [Relevant Custom Form in Form Code / Description].

Once on that screen, the fields of the Custom Form appear in a ‘bottom half’ view screen to aid in choosing which to match with which HotDocs variable. Since it is HotDocs that would contain the logic needed to select K2's info (as opposed to K1 or K3), it looks to me like having a different Custom Form for each adoptee wouldn’t be a problem. (On the other hand, the field options in Custom Forms are not as robust as in Matter and Contact Forms; for example, you can manually fill in a Date — mm/dd/yyyy — in a Custom Form’s field, but it won’t function like a Date field in a Matter or Contact Form where a date selector can pop up, etc.)

Thanks again for all the help and benefit of your experience!

Birney www.AdoptNeed.com Adoption Law Office of Birney O'Brian Bull 420 West Broughton St. Savannah, Georgia 31412-0011 912-ADOPT-NEED
Page 1 of 1 (13 items) | RSS