Re: dynamic search
Date: 11 Nov 1998 05:19:37 GMT
Message-ID: <19981111001937.17706.00001874_at_ng147.aol.com>
>Does anyone have suggestions to implement 'a search and
>populate' feature in Forms 4.5, i.e.: as soon as user begins
> typing data into a non-base field, Forms should start searching
>the database for a the best matching value, populate the non-base
>field and refining its search while user continues entering data.
>
>I got some feedback on my question on validation, post-query triggers and
>record_status, but I still can not see how to make Forms NOT to set the
>record status to 'CHANGED' if a
>base table item becomes overwritten with the same value.
>I don't see the need for setting the record status to 'CHANGED', if
>there is no change.
>
>gert
The way I accomplished this kind or result was to query all the records, then use a 'type and go to' functionality. Not quite the same thing as you as suggested, but maybe it will work for you. To do this, I had a non-db field, the search string. The when-new item-instance for the field started a timer (I think 1.5 seconds seemed good). When the timer expired, it compared the previous field contents with the current. If it was different, it went up or down the record set (using NEXT_RECORD or PREVIOUS_RECORD) until an appropriate record was found.
There are some subtleties involved regarding when to stop when traversing z-to-a. I think you have stop when you get a record BEFORE yours, then go forward one. It's been a while since I wrote it, so you will have to figure that part out yourself.
The performance on approx 2500 rows on a 64M 200Mhz NT4.0 machine was pretty good, with 1500 rows, it was almost perfect.
Hope that helps
Dan Hekimian-Williams Received on Wed Nov 11 1998 - 06:19:37 CET
