Jump to content
Sign in to follow this  

Address Search Help

Recommended Posts


So I have a CSV file that I am able to read into an array, so far ok. I can search through that array and find what I am looking for but here is what I am having issues with.

I may have many names for 1 address I would like to display all of the names for the 1 address. here is what my csv file looks like


Bob Smith,1313 Harbor Blvd,Anaheim,ca,92504

Jane Smith,1313 Harbor Blvd,Anaheim,ca,92504

Lucy Doe,1313 Harbor Blvd,Anaheim,ca,92504

how can I display this info so my user can search for the name and find the address or search for the address and find the names with that address

here is the code I use for what I have now

$iIndex = _ArraySearch($aRecords, $sSearch, 0, 0, 0, 1)
$add_array = StringSplit($aRecords[$iIndex],",")

I can do the search but it would only find the first instance of the address

Share this post

Link to post
Share on other sites


To get all instances of $sSearch you will have to keep looping through _ArraySearch with a new $iStart parameter (the last found index + 1) until you get @error = 6 - "$vValue was not found in array".

That should get you all indices which match $sSearch. if you saved them into an array as you went along, you could then display the result (with ListView perhaps?).


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:


ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this