text changed trigger [message #454336] |
Wed, 05 May 2010 02:00 |
ghadeer
Messages: 25 Registered: February 2010 Location: ksa
|
Junior Member |
|
|
Hi All,
Is there text changed trigger with text item function like when_list_changed trigger of list item????????
thanks all
ghadeer
|
|
|
|
Re: text changed trigger [message #454341 is a reply to message #454340] |
Wed, 05 May 2010 02:28 |
ghadeer
Messages: 25 Registered: February 2010 Location: ksa
|
Junior Member |
|
|
Hi
many thanks....
but its not working well with me,my case is I want to design search window working like lov ,so I wrote this trigger
declare
Cursor C is
SELECT
SUBJECT_SLNO,SUBJECT
FROM tabel_name
WHERE
SUBJECT like :BLK_BROWES_LABELS.SEARCH ||'%' ;
begin
go_block('BLK_BROWES');
Clear_Block;
open C;
Loop
fetch C into
:BLK_BROWES.SUBJECT_SLNO,
:BLK_BROWES.SUBJECT;
exit when C% notFound;
next_record;
end loop;
close C;
first_record;
go_item('BLK_BROWES_LABELS.Search');
end;
which well filter search letter by letter,its working with list item in when_list_changed trigger ,but what a bout text item????
|
|
|
|
|
|
|
Re: text changed trigger [message #454549 is a reply to message #454490] |
Thu, 06 May 2010 04:17 |
djdino2000
Messages: 1 Registered: May 2010 Location: Porto, Portugal
|
Junior Member |
|
|
I had to create something like that, i had a search field and a block used for the results. here's what i've done:
-create an item to store the old value of the search field.
-create when-new-item-instance in the search field, which creates a timer.
-create when-timer-expired, compare the value of the search field with the old and then save the new value. If the values are diferent set the default_where of the block and execute the query, if the value is the same, don't do anything so no unnecessary querys are made. Also remember to delete the timer if system.current_item is not the search field.
This should create an effect like the lov, depending on the timer time and the number of records returned... I know this is not very good in performance, but it will do the job.
hope it helps.
|
|
|