Hello,
In situations where there are two or more sellers ({{Order.Sellers.Code}} = "S" and {{Order.Sellers.Code}} = "S2") if their property addresses are different, we need both addresses to be shown on the ReadyDoc. The word "and" needs to separate the two addresses. Otherwise, if the addresses are the same, only one needs to populate. How can I go about doing this?
Thanks!
Conditioning Sellers' Addresses
-
- Posts: 1377
- Joined: Wed Jan 15, 2014 3:50 pm
- Location: Raleigh, NC
- Contact:
Re: Conditioning Sellers' Addresses
The following code will enumerate all Sellers and display the information with appropriate commas and "and".
Code: Select all
<VAR $Counter (0)><VAR $Total (0)><VAR $Total (<COUNT {{Order.Sellers}}>)><FOREACH {{Order.Sellers}}><VAR $Counter ({{$Counter}} + 1)><IF ({{$Counter}}>1)><IF ({{$Counter}}<{{$Total}})>, <ELSE> and </IF></IF>{{.Address.FullAddress}}</FOREACH>
Bob Richards, Senior Software Developer, SoftPro
Re: Conditioning Sellers' Addresses
That worked - thank you very much for your help!