A little more help on this please…..
The code below returns a @popupchoice list that looks like this:
Location – LocAddress
Location – LocAddress
Location – LocAddress
Several of the LocAddresses are identical. I just can't seem to figure out how or where to incorporate your code Carl; @UniqueStringArray(@SortStringArray( MyStringArray, 0)) so that the result would remove all but one of the duplicate Locations if the LocAdresses are the same.
Thanks for your help.
Brandon
vRS = @XResultSetSearch(@FN,"Customers", SEARCH_MODE_OR, SEARCH_SYNTAX_QA, "")
If vRS > -1
{
vCount = @XResultSetTotal(vRS)
If vCount = 0
{
@MsgBox("No matching records.", "", "")
}
vList = ""
XResultSetSort(vRS, "Location:-1")
For vLoop = 1 To vCount
XResultSetCurrentPosition(vRS, vLoop)
vLocation = @XResultSetValue(vRS, "Location")
vLocAddress = @XResultSetValue(vRS, "LocAddress")
vList = vList + vLocation + " " + "-" + " " + vLocAddress + ";"
Next
PopupSelectPosition(3, 108, 105)
vChoice = @PopupChoiceList(vList, "SELECT A LOCATION")
vGroup = @Left(vChoice, @Instr(vChoice, "-")-1)