I have seen where this has been done using an ontimer script trigger to do the search instead of keystroke. Sorry, I don't have a link to an example.
You could use 2 global fields: the user enters into the first field, then clicks a button that updates the second global field. The portal filter uses this second global field.
You could maybe use an onObjectExit script tirgger to automate the clicking of the button, but the user will need to exit the field.
Bruce has the key. Matt Petrowsky is the one that has a technique that does exactly this. It makes use of OnTimer script step and an OnKeyStroke script trigger. Matt offers subscriptions to his video technique files, but this one happens to have free access. There is a video and a sample file that you can download.
I can tell you that it made a big difference to a large, heavily used database at a client site. This dB had many instances of type-ahead filtering and they were becoming a bottleneck. It is on a LAN as opposed to your WAN dB, but I bet that it will help there as well.
Doug de Stwolinska
I knew I saw it in one of Matt's movies, but didn't go back far enough.
Unfortunately, I am unable to get this technique to work with a filtered portal in a Data Separation Model. The example by Matt that you cited was used in a standard list view layout.
I really appreciate the prompt and useful tips by you and the other FileMakers out there!
- - Scott
Doug pointed me in the direction of an example done by Matt Petrowsky, but I was unable to apply the technique to a filtered portal.
Thanks for your help, as it is still very much appreciated.
- - Scott
I really need the "Filter-As-You-Type" interface functionality, though I appreciate your suggestion.
- - Scott
What is the primary source for the portal filter? Are you trying to search on multiple fields, or a single field?
I have set up filters for a portal where the local side has a global field that is used to select records from the remote table. If you are doing something like that you could use two fields, one the user types into and one that does the filtering. Then the ontimer script would take the contents of the user field and put it into the filter field and committ.
Hope this helps. If you can supply a bit more detail possibly I could be more help
I got the example from Matt working in a data-separation model, using the fields in the screenshot.
It may get slow and you should not use it on very large db. But on test sets with 5000 company names it was acceptable, even over WAN.
The mistake I made was to have the field in an opening layout (single record table), but when I added this field to the session table and the FILTER_company field was user specific, it worked fine.
The trigger was OnObjectModify on FILTER_company.