Page 1 of 1

Formula Coding

Posted: Wed Dec 27, 2023 7:11 am
by cklahr
Hi,

The below code isn't giving me the desired results. Any idea what the issue can be? It works well if only one of the paragraphs are in. Otherwise, it checks only the last one? How can I have it check all if necessary?

Thank you very much!

Code: Select all

value = ""

Iterate {{Order.Buyers}} From 1 To #{{Order.Buyers}}
IF ((@.BankruptcyDistrictResults## = "no records") AND  (@.District## <> {{Order.Properties[1].BankruptcyDistrict#}})) Then
value = True
Else
value = False
EndIf
Break
Loop

Iterate {{Order.Sellers}} From 1 To #{{Order.Sellers}}
IF ((@.BankruptcyDistrictResults## = "no records") AND  (@.District## <> {{Order.Properties[1].BankruptcyDistrict#}})) Then
value = True
Else
value = False
EndIf
Break
Loop

Iterate {{Order.Others}} From 1 To #{{Order.Others}}
IF ((@.BankruptcyDistrictResults## = "no records") AND  (@.District## <> {{Order.Properties[1].BankruptcyDistrict#}})) Then
value = True
Else
value = False
EndIf
Break
Loop

Re: Formula Coding

Posted: Tue Jan 02, 2024 1:04 pm
by kkellett
Hello,

When the formulas are stacked this way, the last one will "win" over the others. If we join the coding so it checks all of the contacts this should work:


value = ""

Iterate {{Order.Buyers}} From 1 To #{{Order.Buyers}}
IF ((@.BankruptcyDistrictResults## = "no records") AND (@.District## <> {{Order.Properties[1].BankruptcyDistrict#}})) Then
value = True
Else

Iterate {{Order.Sellers}} From 1 To #{{Order.Sellers}}
IF ((@.BankruptcyDistrictResults## = "no records") AND (@.District## <> {{Order.Properties[1].BankruptcyDistrict#}})) Then
value = True
Else

Iterate {{Order.Others}} From 1 To #{{Order.Others}}
If ( @.OtherType = "Prior Owner w/o$" Or @.OtherType = "Guarantor" Or @.OtherType = "Name on application" Or @.OtherType = "Name Requested") Then
IF ((@.BankruptcyDistrictResults## = "no records") AND (@.District## <> {{Order.Properties[1].BankruptcyDistrict#}})) Then
value = True
EndIf
EndIf
Loop
EndIf
Loop
EndIf

Loop

Re: Formula Coding

Posted: Thu Jan 04, 2024 4:20 am
by cklahr
Thank you very much!!