dbTalk Databases Forums  

? instant ? incremental ? interactive search

comp.databases.filemaker comp.databases.filemaker


Discuss ? instant ? incremental ? interactive search in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Joe Murphy
 
Posts: n/a

Default ? instant ? incremental ? interactive search - 06-03-2007 , 07:00 PM






Obviously, I lack the techno-vocabulary to say precisely what I mean. I
am wondering if FMP can show the current matches for a search as I type
each letter. Let's say for the moment that the purpose is just to look
up a single word. In reality, each result word would index a longer
phrase. So typing 't' shows 'tap', 'tip', 'tom', 'top'. Continuing with
'o' (for a search string of 'to') shows 'tom', 'top'. Completing with
'p' shows 'top'.

The way to do this seems to require using a portal. The related table
would have to be reconstructed for each new word by adding a table row
for just first letter, the first two letters, three letters, ... Simple
minded and programmable. Yet this would generates a large table. Is
there a better way?

Now assume there's a way, portal or otherwise, to relate the partial
search term to a set of results. Can FMP be told to perform the search
after each keystroke? Or would the user have to hit 'ENTER' after each
letter?

Thanks for any ideas,

Joe

Reply With Quote
  #2  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: ? instant ? incremental ? interactive search - 06-03-2007 , 07:55 PM






It might be helpful for you to explain what you are trying to do. The
"type-ahead" filter feature as you describe is a built-in option when
you attach a drop-down value list to a field on a layout. Once the
desired word or portion thereof is typed, script it so that clicking a
button or pressing the enter key will run a script to find the results
based on what has been typed.

Joe Murphy wrote:
Quote:
Obviously, I lack the techno-vocabulary to say precisely what I mean. I
am wondering if FMP can show the current matches for a search as I type
each letter. Let's say for the moment that the purpose is just to look
up a single word. In reality, each result word would index a longer
phrase. So typing 't' shows 'tap', 'tip', 'tom', 'top'. Continuing with
'o' (for a search string of 'to') shows 'tom', 'top'. Completing with
'p' shows 'top'.

The way to do this seems to require using a portal. The related table
would have to be reconstructed for each new word by adding a table row
for just first letter, the first two letters, three letters, ... Simple
minded and programmable. Yet this would generates a large table. Is
there a better way?

Now assume there's a way, portal or otherwise, to relate the partial
search term to a set of results. Can FMP be told to perform the search
after each keystroke? Or would the user have to hit 'ENTER' after each
letter?

Thanks for any ideas,

Joe
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg
FM Professional Solutions, Inc. Los Angeles

FileMaker 8 Certified Developer
Member, FileMaker Business Alliance


Reply With Quote
  #3  
Old   
Joe Murphy
 
Posts: n/a

Default Re: ? instant ? incremental ? interactive search - 06-05-2007 , 06:05 AM



Thanks for the reply, Howard.

I thought it would be nice if I could use FMP to approach the
functionality of an old Unix-based search program that performed a full
regex 'grep' for each keystroke. The regex part did require a fast CPU.
As a pale approximation of this (no regex), consider the search function
of the Max OSX "Preview" for viewing a PDF. Each additional keystroke
produces a refined set of results.

At the moment, all I am trying to do is answer two questions:
can FMP react to individual keystrokes other than ENTER/RETURN
(cf Unix 'raw' mode)

is there a clever/efficient way to specify a relation such that the
match key is a partial word (first letter, first two letters, ...)
the brute force way would be an external program that split each
word into separate substrings

My demo/proof-of-concept case is a dictionary. I want to be able to
type one letter, and see all words that begin with that letter. Then,
without retyping the first letter, I want to type another letter, and
see all words that start with those two letters. At each stage, I would
be able to select one word of the multiple matches to do a lookup for
its definition.

Howard's suggestion of a drop down menu from value list reply might be
useful for a small dictionaty. But is there a limit on the size of the
value list? There could be thousands of words in the dictionary.
Looking ahead to the more complex problem than the display of the
dictionary words themselves, where I want the definition of the word,
the search is not going to be so smooth.

As I understand the reply, I would have to hit 'ENTER' after entering a
partial string to 'lock in' the value list item and perform the search.
OK, one extra keystroke. Then, do a four letter search after doing a
three letter search, I would have to re-enter the first three letters
followed by the forth. Not OK, three extra keystrokes.

Can FMP come any closer to an interactive search?



Howard Schlossberg replied:

Quote:
It might be helpful for you to explain what you are trying to do. The
"type-ahead" filter feature as you describe is a built-in option when
you attach a drop-down value list to a field on a layout. Once the
desired word or portion thereof is typed, script it so that clicking a
button or pressing the enter key will run a script to find the results
based on what has been typed.

Joe Murphy wrote:
Obviously, I lack the techno-vocabulary to say precisely what I mean. I
am wondering if FMP can show the current matches for a search as I type
each letter. Let's say for the moment that the purpose is just to look
up a single word. In reality, each result word would index a longer
phrase. So typing 't' shows 'tap', 'tip', 'tom', 'top'. Continuing with
'o' (for a search string of 'to') shows 'tom', 'top'. Completing with
'p' shows 'top'.

...

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.