Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S: Find clarification

 
Lek Olof
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been reading the search criteria discussion here on the forum but still I am confused.

The following condition each seperatly read is crystal clear:
- It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.

- Field n in the database file is described by
criteria[n]. A null value in criteria[n] matches any field
value. A non-null value in criteria[n] matches any field
value that begins with criteria[n]. (For example, "Fred"
matches "Fred" or "Freddy".)


But when I try to put them together I am a bit confused. I was testing the following case when I got confused. For example the record:

Freddy Boston

If I search with empty fields, this record will be found. How about searching with the following conditions, should the above record be found in each of the following cases?

1. Fred Boston
2. Fred Bos
3. Freddy Boston (of course it should be found here but I just want to point out that I think there is a difference in these 3 searh conditions)

thanks in advance!
 
Mark Smyth
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lek Olof:
I have been reading the search criteria discussion here on the forum but still I am confused.

The following condition each seperatly read is crystal clear:
- It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.

- Field n in the database file is described by
criteria[n]. A null value in criteria[n] matches any field
value. A non-null value in criteria[n] matches any field
value that begins with criteria[n]. (For example, "Fred"
matches "Fred" or "Freddy".)


But when I try to put them together I am a bit confused. I was testing the following case when I got confused. For example the record:

Freddy Boston

If I search with empty fields, this record will be found. How about searching with the following conditions, should the above record be found in each of the following cases?

1. Fred Boston
2. Fred Bos
3. Freddy Boston (of course it should be found here but I just want to point out that I think there is a difference in these 3 searh conditions)

thanks in advance!


1 and 2 should not be found because "Fred Boston" or "Fred Bos" are not substrings of "Freddy Boston".

Your search should return the record if the record field begins with or exactly matches the search field for example it should return a match for "F", "Fred", "Freddy", "Freddy B", "Freddy Bost" etc.

Regards Mark.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic