Page 1 of 1

VAR coding

Posted: Fri Dec 30, 2022 5:55 am
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>

Re: VAR coding

Posted: Tue Jan 03, 2023 11:28 am
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.

Re: VAR coding

Posted: Thu Jan 05, 2023 8:04 am
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?

Re: VAR coding

Posted: Thu Jan 05, 2023 1:06 pm
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>

Re: VAR coding

Posted: Mon Jan 09, 2023 7:24 am
by cklahr
Thank you so much!! I will test this out. Looks great.