Item Finding Algorithm

Subscribe to Item Finding Algorithm 3 posts

avatar for qwerber qwerber 4717 posts
Flag Post

I’m using VBA to access excel values; but the language isn’t the important thing here.

I have in my data some client information. They have different informations, informations, such as Name, Phone, CellPhone, etc.

In the search window I created, there are several fields that the user can input into. There is the name field, phone field, cell field, along with some others.

When I click the find button, the program should either fill the other fields accordingly by looking up the partial information the user provides, or return error if there is no match.

I can’t solve this problem; how am I supposed to check when the use inputs a Phone that doesn’t have the corresponding name inputed? I can think of many ways to handle this, but what is the best way to handle this problem for any tow mismatching inputs?

 
avatar for Draco18s Draco18s 6860 posts
Flag Post

For each search field filled in, do a search against the database. Skip blank inputs.

If they fill in more than one field, rank matches according to how many different fields were matched.

Eg. if they put in first name, last name, and phone number, then…

[match], [match], [match] ranks first
[match], [no match], [match] ranks second
[no match], [match], [no match] ranks third

Within each of those groupings, order is likely unimportant.

 
avatar for qwerber qwerber 4717 posts
Flag Post

Good idea, implementing now.