Numbering mortgages and assignments

Discussions related to ReadyDoc development.
Post Reply
Miri Yosef
Posts: 67
Joined: Sun Oct 26, 2008 6:14 am

Numbering mortgages and assignments

Post by Miri Yosef »

Hi,

I need to create a document listing from the Existing liens in the title tab all the mortgages and their related assignment, I need some help with the numbering. I'm trying to have the result look like this:

A Mortgage
Mortgagor
Mortgagee
Date
Recorded
Amount

A1 Assignment
Assignor
Assignee

A2 Assignor
Assignee

Page Break
B Mortgage
Mortgagee

B1 Assignment
Assignor
Assignee

B2 Assignment

B3 Assignment

Page Break

C Mortgage

C1 Assignment


Thanks
Miri Yosef
Mark McKenna

Re: Numbering mortgages and assignments

Post by Mark McKenna »

At present, I don't think you can do exactly what you're attempting to do. The problem is that the numbering of the nested Assignment loops is dependent upon the outer loop, which itself is a dynamically built list. So while you could achieve the A,B,C numbering of the outer loop, you would not be able to use the current iteration's letter assignment as part of your inner numbering.

Consider the following:

Code: Select all

<FOREACH {{.ExistingSecurityInstrument}}>
  A. {{.InstrumentType}}
<FOREACH {{.Assignment}}>
    A1.  Assignment
    Assignor: {{.AssignorName}}
    Assignee: {{.AssigneeName}}
</FOREACH>
</FOREACH>
Here, the "A." is a Level 1 numbering assignment using letters, and the "A1." is a Level 2 numbering assignment using numbers and a "character before". When the document renders, each Lien is assigned A, B, C, etc. just like you want, but inside each Lien, the iteration over Assignments has no idea which letter was assigned to its parent Lien, thus it numbers A1, A2, A3 every time. And you can't use a different "character before" anywhere because the lists are being dynamically built as the document renders.
Miri Yosef
Posts: 67
Joined: Sun Oct 26, 2008 6:14 am

Re: Numbering mortgages and assignments

Post by Miri Yosef »

Another issue, I put a page break before the outer Foreach so that every mortgage will show with it's assignments on a separate page, the problem is that the system also gives me a blank page after the last mortgage. How can I avoid this?
Document attached
my_NY_ReportMortgageSchedule.doc
(50 KiB) Downloaded 54 times
Thanks
Miri Yosef
Mark McKenna

Re: Numbering mortgages and assignments

Post by Mark McKenna »

There is currently not a clean "preferred" way to do what you are attempting to do. However, a bit of variable magic could do the trick. You could try something like this, which first counts the number of liens and holds that value inside a scalar variable named $Count, derementing it 1 each iteration, then conditionally inserting the page break if there are more liens to process in the loop. Like I said, it's not real clean, but I think it would do what you're looking for with a little bit of manipulation.

Code: Select all

<VAR $Count (<COUNT {{.ExistingSecurityInstrument}}>)>
<FOREACH {{.ExistingSecurityInstrument}}>

<VAR $Count ({{$Count}} - 1)>
  A. {{.InstrumentType}}
<FOREACH {{.Assignment}}>
    A1.  Assignment
    Assignor: {{.AssignorName}}
    Assignee: {{.AssigneeName}}
</FOREACH>
<IF ( {{$Count}} > 0 )>
----------------------------------- page break -------------------------------------
</IF>
</FOREACH>
Miri Yosef
Posts: 67
Joined: Sun Oct 26, 2008 6:14 am

Re: Numbering mortgages and assignments

Post by Miri Yosef »

Thanks
Post Reply