Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

searching for 2 words with same first letter


This topic is 7240 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Ray Novitske called my attention to this odd search result. In FileMaker Pro 7, finding items in a field holding 2 words beginning with the same letter yields unusual results. Consider a concantenated field (Firstname & " " & Lastname).

A search for "Dan D", yields "Daniel Davis" and "Daniel Steen".

Search for "D Davis", yields "Daniel Davis" and "Rusty Davis".

N script will call for deleting a record after such a vague, short-cut find. However, if you are making up nonsense words for some elaborate navigation scheme, the rule should be AVOID ANY WORDS USING THE SAME FIRST LETTER. Where 2 words starting with the same letter, or hyphenation as in "cha-c", searching for "cha-c", yields "cha-c", "chan", "cha l" and "cha cha". Such a find could throw off the navigation.

To find any "Mc" in a customer concantenated name field, search for "Mc m". Yields "Mc Ride", "McDerm", etc. "M mc" and "mc" get the same result. However, if you search for "R mc", yield is only those names with First name beginning with "R" and Last name beginning with "Mc" (ie, "Robert McGrew").

To find customers whose first OR last name begins with "R", search for "R R". "R" gets the same result including "Robert Roberts" and "Robert Martin". Howdver, searching for "R m" finds only those with First name beginning with "R" and Last name beginning with "M". Any repetition of the first letter after a space yields a larger find than 2 different letters separated by a space.

If both search letters are the same, or both search strings begin with the same letter, and the strings exist in any of the words in the field, it will be found. "Ro Ro" finds all instances of "ro". "Ro B" finds only "Rob.. B...". ROBERT ROBERTS CANNOT BE ISOLATED BY ANY SHORTCUT SEARCH. (same for Marjie Mayer). "Ma Ma" finds any person with either a First name or Last name starting with "Ma". "Mar Mar" eliminates any "mad", etc, names but includes in the find "Mary Martin" (as one would expect) as well as Marjie Mayer which does not strictly match the search.

Is there a deliberate cause for this odd result?

Posted

I think you may be a bit confused by the way searches are performed in FileMaker. Criteria is considered separately, not as a unit, unless you enclose the criteria within quotes, in which case all criteria except the last must be whole words. For example, "daniel d" will find 'Daniel Davis' only, while "dan d" will not find any 'Daniel's, but will find 'Dan Dominic' and 'Dan D.'

The order of words in a field in a request is irrelevant. A search for "dan d" produces the same results as a search for "d dan" does. It isn't limited to the first word or character in the search being contained in the first word of the results, or the second word/character being contined in the second word of the field, etc.

Also, a search for "dan d" means find all records that contain at least one word beginning with 'dan' and at least one word starting with 'd'. Since 'dan' already starts with 'd', this is somewhat redundant. 'Daniel Steen' is returned because it meets both criteria--'Daniel' starts with both 'dan' and 'd'. The same goes for 'Rusty Davis' being returned when searching for "d davis", since 'Davis' meets both criteria.

Similarly, a search for "r r" is completely redundant--it's the same as a search for "r". "ma ma" is the same as "ma", etc.

I was not able, however, to duplicate your issue with the hyphen. That may be a regional settings issue related to how hyphens are treated.

  • Newbies
Posted

Thanks! Was confused and now see more about how FMP works. The hyphenated example still stands. It seems it might be new to FMP 7 since prior to 7, hyphenated words were counted as one.

Posted

To clarify, I tested all of the above on 7. That's why I suggested it may be a regional issue. Where are you located?

This topic is 7240 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.