VAR coding

Discussions related to ReadyDoc development.
Post Reply
cklahr
Posts: 71
Joined: Tue Oct 27, 2009 3:32 am

VAR coding

Post by cklahr »

Hi,

Would you be able to assist with coding the below in VAR format? I would like to select which properties shall appear, and the info should then populate accordingly..

Thank you very much!


<FOREACH {{Order.Property}}><IF ({{.SortOrder}}=1)>{{.Address1Address2}}, {{.TownCityTitle}} of {{.TownCity}}, State of {{.State LSTATE}}<IF ({{Order.Property[1].State}} = “NJ”)><IF (({{Order.IsCommercial}} = True) AND (Not IsEmpty ({{.EscrowBriefLegal}})))>

{{.EscrowBriefLegal}}<ELSE>

Tax Lot <IF (Not IsEmpty ({{.EscrowBriefLegal}}))>{{.EscrowBriefLegal}}<ELSE><REF NOFORMAT (my_Lots)>, Block {{.Block}}</IF></IF><ELSE><FOREACH {{.Parcel}}><IF ({{.SortOrder}}=1)>

Parcel No. {{.Identification}}<ELSE>, {{.Identification}}</IF></FOREACH></IF>

County of {{.County}}<ELSE>

{{.Address1Address2}}, {{.TownCityTitle}} of {{.TownCity}}, State of {{.State LSTATE}}<IF ({{.State}} = “NJ”)><IF (({{Order.IsCommercial}} = True) AND (Not IsEmpty ({{.EscrowBriefLegal}})))>

{{.EscrowBriefLegal}}<ELSE>

Tax Lot <IF (Not IsEmpty ({{.EscrowBriefLegal}}))>{{.EscrowBriefLegal}}<ELSE><REF NOFORMAT (my_Lots)>, Block {{.Block}}</IF></IF><ELSE><FOREACH {{.Parcel}}><IF ({{.SortOrder}}=1)>

Parcel No. {{.Identification}}<ELSE>, {{.Identification}}</IF></FOREACH></IF>

County of {{.County}}</IF></FOREACH>
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: VAR coding

Post by BobRichards »

I'm a bit unsure what you mean by "VAR format". Do you mean simply requesting using Variables where possible or do you have a specific format in mind. Or do you mean the user is presented with a list of properties and they select one or more?

Thanks.
Bob Richards, Senior Software Developer, SoftPro
cklahr
Posts: 71
Joined: Tue Oct 27, 2009 3:32 am

Re: VAR coding

Post by cklahr »

Thank you very much! So, I'm wondering if there is a way to store an array of properties in variables which we can then loop through to fill the document.

Is that a possibility?
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: VAR coding

Post by BobRichards »

I passed your question to our Documents department and received this response. Hopefully if this doesn't directly answer your question, it will at least provide a starting point!

Code: Select all

<IF (<COUNT {{Order.Properties}}>>1)>
<VAR $Prop (0)>
<FOREACH ASK {{Order.Properties}}>
<VAR $Prop ({{$Prop}}+1)>
<IF ({{$Prop}}>1)>

</IF>
{{.Address.Address1Address2}}, {{.TownCityTitle.Description LINE15}} of {{.TownCity}}, State of {{.Address.State.Description}}
<IF ({{.Address.State}}="NJ")>
<IF ({{Order.IsCommercial}}=True AND Not IsEmpty({{.EscrowBriefLegal}}))>
{{.EscrowBriefLegal}}
<ELSE>
Tax Lot <IF (Not IsEmpty({{.EscrowBriefLegal}}))>{{.EscrowBriefLegal}}<ELSE><REF NOFORMAT (my_Lots)>, Block {{.Block}}</IF>

</IF>
<ELSE>
<VAR $Parcel (0)>
Parcel No. <FOREACH {{.Parcels}}><VAR $Parcel ({{$Parcel}}+1)><IF ({{$Parcel}}>1)>, </IF>{{.Identification}}</FOREACH>

</IF>
County of {{.County}}
</FOREACH>
<ELSE>
{{Order.Properties.Address.Address1Address2}}, {{Order.Properties.TownCityTitle.Description LINE15}} of {{Order.Properties.TownCity}}, State of {{Order.Properties.Address.State.Description}}
<IF ({{Order.Properties.Address.State}}="NJ")>
<IF ({{Order.IsCommercial}}=True AND Not IsEmpty({{Order.Properties.EscrowBriefLegal}}))>
{{Order.Properties.EscrowBriefLegal}}
<ELSE>
Tax Lot <IF (Not IsEmpty({{Order.Properties.EscrowBriefLegal}}))>{{Order.Properties.EscrowBriefLegal}}<ELSE><REF NOFORMAT (my_Lots)>, Block {{Order.Properties.Block}}</IF>

</IF>
<ELSE>
<VAR $Parcel (0)>
Parcel No. <FOREACH {{Order.Properties.Parcels}}><VAR $Parcel ({{$Parcel}}+1)><IF ({{$Parcel}}>1)>, </IF>{{.Identification}}</FOREACH>

</IF>
County of {{Order.Properties.County}}
</IF>
Bob Richards, Senior Software Developer, SoftPro
cklahr
Posts: 71
Joined: Tue Oct 27, 2009 3:32 am

Re: VAR coding

Post by cklahr »

Thank you so much!! I will test this out. Looks great.
Post Reply