Any way to specify an AND search for non-sequential words

Support, Tips and Mods for Matt Navarre's SearchResults technique.
Posts: 49
Joined: Wed Apr 28, 2004 11:31 pm
PostPosted: Mon Feb 15, 2010 3:08 pm
I would love to be able to sort for "john" and "Glasgow' but cannot find any way to do this unless john and glasgow are next to each other, "john Smith Glasgow" would not be found.

Is there any way the discrete words could be separated to perform AND searches?
----------------------
Tim Anderson Group
Scotland

http://www.timanderson.co.uk
Posts: 49
Joined: Wed Apr 28, 2004 11:31 pm
PostPosted: Tue Feb 16, 2010 12:38 am
To clarify a little - ideally I would like to search for a date AND a name. However if there is a mix of date and text then the datatype is always text and so no dates are searched.

Thanks
----------------------
Tim Anderson Group
Scotland

http://www.timanderson.co.uk
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed Feb 17, 2010 7:43 am
That's right Tim. fmSearchResults looks at the whole search string to determine the data type being searched, rather than assigning a data type to each word in the search.

Interestingly, you can tell fmSearchResults to search in your date field even when it thinks it has text: you do this simply by adding a date field to the "Text fields" section of the Search Layout for the table you're interested in.

For example in the sample data that comes with fmSearchResults searching for "12/21/2004 Fred" doesn't find any invoices even though we have invoices on that date. If I got to the invoices search layout (Table04) and add the field Invoice Date to that layout (giving it the object name "Text02") then my search returns invoices with a date of 12/21/2004.

Note that this will always be an OR search, since no date field will ever contain the literal string "12/21/2004 Fred". If you need to have an AND search-- invoices with a date of 12/21/2004 and company name of Fred-- you'd either want to do that as a traditional FileMaker find or ask Matt Navarre at MSN media to mod SearchResults for you to do that. Let me know if you'd like me to put you in touch with Matt for that mod.

I hope that helps,

John
John Sindelar
SeedCode
Posts: 49
Joined: Wed Apr 28, 2004 11:31 pm
PostPosted: Wed Feb 17, 2010 7:51 am
Thanks John,
Have added date field to the text field section to get the 'or' result but unfortunately this will be no use in the circumstances - I am searching an act bookings table and need to find an act on a date - an 'or' would produce hundreds of results!

Think I will find a way round this by specifying the format to use for the search such as "xx/xx/xx actname" and create another field in the Bookings table that concatenates the two.
(Will be slightly more complicated because user will want to search on only part of the Act name such as "02/02/09 chilli" for a booking for the Red Hot Chilli Pipers - yes Pipers, not Peppers!)

Cheers

Tim
----------------------
Tim Anderson Group
Scotland

http://www.timanderson.co.uk

Return to fmSearchResults

Who is online

Users browsing this forum: No registered users and 1 guest

(855) SEEDCODE
[email protected]
Follow us: