PC for individual names of sellers and buyers

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

PC for individual names of sellers and buyers

Post by Miri Yosef »

Hi,

What PC should I use if I want the document to be rendered for each individual buyer and seller. Right now I have the PC as
{{Order.Contact[{{.ContactType}}="Seller" OR {{.ContactType}}="Buyer/Borrower"]}} }}
With this PC I receive one document for a husband and wife instead of two separate ones.

Thanks
Miri Yosef
danvanf
Posts: 54
Joined: Fri Nov 07, 2008 10:45 am
Location: Dayton, Ohio
Contact:

Re: PC for individual names of sellers and buyers

Post by danvanf »

Hi Miri,
How about a PC of {{Order.Contact[{{.ContactType}}="Seller" OR {{.ContactType}}="Buyer/Borrower"].Person}}. That should filter for Type, but print a page for each person.

Dan Van Fleet
I blog at http://DanVanFleet.com on SoftPro and other things
Miri Yosef
Posts: 67
Joined: Sun Oct 26, 2008 6:14 am

Re: PC for individual names of sellers and buyers

Post by Miri Yosef »

Mr. Van Fleet

This solution works great for individual buyers or seller but it doesn't work for a seller/buyer which is an organization, any suggestions?

Thanks
Miri Yosef
danvanf
Posts: 54
Joined: Fri Nov 07, 2008 10:45 am
Location: Dayton, Ohio
Contact:

Re: PC for individual names of sellers and buyers

Post by danvanf »

Hi Miri,

Does your Organization have any "People" associated with it?

My test document is attached, which works as long as my organization has people associated with it.

I do get a selection box, to pick who gets the letter, I don't care for it, nor understand why it shows up. My PC is specific, so I'm going to hijack your thread a bit to ask, why doesn't Select know, I want to print this document for everyone. SP Please review the attached document for more information.

Thanks,
Dan Van Fleet
Attachments
Miri Individual Names.doc
Sample Document
(743 KiB) Downloaded 60 times
I blog at http://DanVanFleet.com on SoftPro and other things
Mark McKenna

Re: PC for individual names of sellers and buyers

Post by Mark McKenna »

The primary context of a ReadyDoc determines which business objects inside the particular Order "qualify" to be the executing context of the document when generated. In your case, you have 4 qualifying objects/people. There is a checkbox near the Preview/Print buttons that lets you automatically generate the document for every object that qualifies. If you don't check the box, we ask ... and allow you to pick none, many, or all. This gives the user the ability to print 1 HUD, print a few HUDs, or print them all ... having only selected one document from the tree.

Contrast this with the earlier versions of SoftPro that required separate document copies for every multiple that could exist (e.g. Document A - Buyer 1, Document A - Buyer 2, Document A - Buyer 3, etc.). In Select you create one "Document A" and allow it be executed against any number of qualifying Buyers (which was a necessity given the open-ended nature of our multiples now).
danvanf
Posts: 54
Joined: Fri Nov 07, 2008 10:45 am
Location: Dayton, Ohio
Contact:

Re: PC for individual names of sellers and buyers

Post by danvanf »

Thanks Mark! I think my eyes were blind this morning, that totally makes sense. Indeed I love the ability to create one document for everyone. Multiples open up doors that were never considered in older products!

Thanks for the hijack Miri!

Dan Van Fleet
I blog at http://DanVanFleet.com on SoftPro and other things
Miri Yosef
Posts: 67
Joined: Sun Oct 26, 2008 6:14 am

Re: PC for individual names of sellers and buyers

Post by Miri Yosef »

Hi Dan,

Your suggestions work fine as long as my organization has a person, the problem is, that I don't always have a person's name for the organization. Sometimes I only have the company's name, how could I still have the document generated for the organization. (in Select, the corporate officers are the persons when there seller/buyer is not an individual person)

Thanks
Miri
danvanf
Posts: 54
Joined: Fri Nov 07, 2008 10:45 am
Location: Dayton, Ohio
Contact:

Re: PC for individual names of sellers and buyers

Post by danvanf »

Interesting issue. So far I have not found a complete solution. I can get it to work, but I get an extra blank page. I've tried to quash that blank page using {{.SortOrder}}, but that doesn't exist under either {{Order.Buyer}} or {{Order.Buyer.Person}} so we can't use it to control the pages.

I also find it interesting that {{Order.Buyer.Person}} has the information we need, (or {{.Seller.Person}} ) but {{Order.Contact.Person}} doesn't include the person information when it's an Organization. I know it's been asked of development, that when it's an organization, the Officers details screen be expanded to include other {{.Contact.Person}} type information. If that becomes the case, then the first option should work, depending on how the developers implements the additional information. I expect they would simply make the "Add Corporate Officer/Signee to {{Order.Number}}" Screen to be a {{.Contact.Person}} Screen, if so it's all good. SP Doc Developers, please forward this thread to the Development team for review. (thanks!)

So since some printers eat blank pages, the solution which will work, but generate an extra blank page is.
PC: {{Order}}
<FOREACH {{Order.Buyer}}>
<FOREACH {{.Person}}>

Letter Data
You can user {{.OrderContact.*}} to refer to the parent level of the current context.
What I mean is if your letter needs to include something like BankDrawnOn, you can see that field with {{.OrderContact.BankDrawnOn}} in the letter

----- Page Break -------------
</FOREACH>
</FOREACH>
<FOREACH {{Order.Seller}}>
<FOREACH {{.Person}}>

Letter Data

----- Page Break -------------
</FOREACH>
</FOREACH>

Just a thought.... It would be great if the # number of objects in a collection were available for the rendering engine. Of course in this case we would need {{.SortOrder}} also. Then we could do a simple if the number of object in the collection were equal to the current sortorder, don't do a page break.

I'll likely play with this some more, but I'm not feeling I have a prospective solution in mind.

Dan Van Fleet
I blog at http://DanVanFleet.com on SoftPro and other things
Mark McKenna

Re: PC for individual names of sellers and buyers

Post by Mark McKenna »

Just a thought.... It would be great if the # number of objects in a collection were available for the rendering engine.
Dan,
The latest release of Select introduces a new SPML token named <COUNT> that is probably what you're looking for. An example is shown below along with the new <VAR> token for scalar variables.

Code: Select all

<VAR $count ( <COUNT {{.Seller}}> )>
There are {{$count}} sellers.
danvanf
Posts: 54
Joined: Fri Nov 07, 2008 10:45 am
Location: Dayton, Ohio
Contact:

Re: PC for individual names of sellers and buyers

Post by danvanf »

Happy Dance, oh oh, I'm doing a happy dance.

VAR and COUNT, Woo Hoo! With that we can solve this and many other issues.

I'm still doing a head bob!, VAR---- awesome!

Thank you development team!

VAR, too cool. Gosh I just can't stop....

So Miri, what Select version are you currently working on?

Dan Van Fleet
I blog at http://DanVanFleet.com on SoftPro and other things
Post Reply