This all can be done with sufficient scripting and a portal filter, but I wonder if you truly need both. A find box would seem to do everything the letter buttons would do plus a lot more...
Working just with the find field, here's a way to set this up where you do not even need to click a button:
Define a filter expression for your portal filter as:
PatternCount ( Rolodex_2::NameField ; Rolodex::searchField ) //matches to any records where the name field contains the text in the search field.
Left ( Rolodex_2::Namefield ; Length ( Rolodex::SearchField ) ) = Rolodex::SearchField //matches to any record starting with the serach text
Use the OnObjectModify script trigger to perfom this script:
Refresh Window [flush cached join results]
to force the portal to refilter with each letter entered, changed or deleted from the search field.
In many applications of this technique, it's helpful to specify global storage for the search field--particularly if this database is to be shared over a network.
You are right! I don't need the letters at all. This is much better..
I'm sure I'm missing something...
I tried both methods which work except that you have to click out of the SearchField or press ENTER for it to search. I tried the OnObjectKeystroke script trigger too.
I prefer the PatternCount method but when the SearchField is empty then the portal is empty. Once I type in the field and click out it displays results. When I use the "Left" method the portal contents are visible when the SearchField is empty.
Thanks so much for your help!
You need to use the OnObjectModify trigger set on the search field. I just went and checked a file where I used this tool. I find that I used this script with the OnObjectModify script trigger:
Refresh Window [Flush Cached Join Results]