I would like to list all the counties of all the properties in the order but not repeat any county.
For example, if I have 3 properties in the order, but all in Ocean county I would want it to look like this:
The land referred to in this policy is described as set forth in the insured mortgage, is situated in the County of Ocean
If 2 of the properties are in Ocean and one is in Mercer, I would like the result to be:
The land referred to in this policy is described as set forth in the insured mortgage, is situated in the County of Ocean and the County of Mercer.
If I would use FOREACH the result would be:
The land referred to in this policy is described as set forth in the insured mortgage, is situated in the County of Ocean, the County of Ocean, the County of Mercer.
Any ideas?
Thanks
Miri Yosef
Property Counties
Re: Property Counties
There is currently not a direct mechanism within SPML for ensuring unique sets of data, or for conditionally building new sets on the fly. However, you might be able to accomplish what you are intending by leveraging custom fields and formulas. A new custom field on the Order could perhaps contain a formula that iterates through the Properties, obtains the county name for each one, and updates the formula's Value each time by building out the sentence fragment as appropriate. Each iteration pass could use the InString() function to see if the county name is already in Value that is being built, and skipping it if the function returns true. When the formula returns, the value in Value becomes the data for the custom field.
-
- Posts: 67
- Joined: Sun Oct 26, 2008 6:14 am
Re: Property Counties
Could you explain exactly how can I do it. I want the result to be all the cities & counties in the property without repeating any county or city.
-
- Posts: 67
- Joined: Sun Oct 26, 2008 6:14 am
Re: Property Counties
I tried the following formula, but it did not bring a city that existed in a different county, or county that had a different city. Any ideas?
Value = “”
Iterate {{Order.Property}} From 1 To #{{Order.Property}}
If ( Value = "" ) Then
Value = @.TownCityTitle + " of " + @.TownCity + ", " + "County of " + @.County
// True formula statements
ElseIf ( (InString(Value, @.TownCity) = -1) and (InString(Value, @.County) = -1) ) Then
Value = Value + ", " + @.TownCityTitle + " of " + @.TownCity + ", " + "County of " + @.County
EndIf
Loop
Value = “”
Iterate {{Order.Property}} From 1 To #{{Order.Property}}
If ( Value = "" ) Then
Value = @.TownCityTitle + " of " + @.TownCity + ", " + "County of " + @.County
// True formula statements
ElseIf ( (InString(Value, @.TownCity) = -1) and (InString(Value, @.County) = -1) ) Then
Value = Value + ", " + @.TownCityTitle + " of " + @.TownCity + ", " + "County of " + @.County
EndIf
Loop
Re: Property Counties
You will need to be more specific with your InString parameters in order to match the entire phrase...
Code: Select all
ElseIf ( ( InString( Value, @.TownCity + ", County of " + @.County ) = -1 ) ) Then
-
- Posts: 67
- Joined: Sun Oct 26, 2008 6:14 am
Re: Property Counties
Thank you Mark,
I tried your suggestion and it worked great!
I tried your suggestion and it worked great!