Buyer/Seller Prompt

Discussions related to ReadyDoc development.
Post Reply
bthorson
Posts: 8
Joined: Wed Feb 21, 2018 1:12 pm

Buyer/Seller Prompt

Post by bthorson » Mon Feb 26, 2018 4:41 pm

I would like to create a document with a prompt to choose between buyer or seller and have the appropriate name and address information populated in both the heading and salutation. Does anyone have a formula that can help me with this?

For example, the prompt would produce:

"John and Tammy Smith
123 Street
Madison, WI

Dear John and Tammy,"

Thanks for any help you can provide.

BobRichards
Posts: 1009
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Buyer/Seller Prompt

Post by BobRichards » Wed Feb 28, 2018 11:19 am

I reached out to a ReadyDoc developer and here is his response:

Normally, what we would do for this is simply utilize the primary context of the document to simulate this "prompt" to select between buyer and seller.
Capture.PNG
Capture.PNG (83.62 KiB) Viewed 1070 times
This is the first item addressed during the rendering process. Because of its ambiguity (the Contacts collection is filtered to both Buyers and Sellers) -- IF more than one contact exists…the user will be prompted to select which contact(s) the document should be rendered for. Then, in the document itself, the field codes used to pull the Name and Address data would be coded relative to the Primary Context:

{{.Name}}
{{.Address.Address1Address2}}
{{.Address.CityStateZip}}

These fields exist on both the Buyer and Seller context -- so, whichever contact is chosen, the document will pull the data accordingly.
Bob Richards, Software Developer, SoftPro

bthorson
Posts: 8
Joined: Wed Feb 21, 2018 1:12 pm

Re: Buyer/Seller Prompt

Post by bthorson » Wed Feb 28, 2018 2:48 pm

Thanks Bob. I was able to get this prompt to work corectly on the document heading.

As a follow up question, I would like to have the buyer or seller first names (as opposed to the full names) show up in the letter greeting, based on the original prompt. Currently I am using a formula like this for buyer and a similar one for the seller:

<IF ({{Order.Buyers.IndivOrOrg}} = "Individual")>
Dear {{Order.Buyers.Individual1.FirstName}}<IF (Not IsEmpty({{Order.Buyers.Individual2.FirstName}}))> and {{Order.Buyers.Individual2.FirstName}}</IF>,
<ELSE>
Dear {{Order.Buyers.People[1].FirstName}},
</IF>

Given the new primary context, do you have any suggestions for how I could modify this to fill in the appropriate first names in the greeting line?

Thanks again for all your help, it's sincerely appreciated.

BobRichards
Posts: 1009
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Buyer/Seller Prompt

Post by BobRichards » Wed Feb 28, 2018 3:28 pm

You do not need to type the "Order.Buyers" in the field descriptors. When you enter the body of the document, the context is already a buyer or seller. I have made the changes in your document fragment.

Code: Select all

<IF ({{.IndivOrOrg}} = "Individual")>
Dear {{.Individual1.FirstName}}<IF (Not IsEmpty({{.Individual2.FirstName}}))> and {{.Individual2.FirstName}}</IF>,
<ELSE>
Dear {{.People[1].FirstName}},
</IF>
Bob Richards, Software Developer, SoftPro

bthorson
Posts: 8
Joined: Wed Feb 21, 2018 1:12 pm

Re: Buyer/Seller Prompt

Post by bthorson » Fri Mar 02, 2018 4:22 pm

Bob, thank you for all your help. This formula worked perfectly.

Post Reply