Page 1 of 1

Conditioning Sellers' Addresses

Posted: Thu Feb 08, 2018 4:47 pm
by applelisa
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!

Re: Conditioning Sellers' Addresses

Posted: Mon Feb 12, 2018 4:40 pm
by BobRichards
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>

Re: Conditioning Sellers' Addresses

Posted: Mon Feb 12, 2018 4:56 pm
by applelisa
That worked - thank you very much for your help!