Home » Developer & Programmer » Forms » text changed trigger
text changed trigger [message #454336] Wed, 05 May 2010 02:00 Go to next message
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 #454340 is a reply to message #454336] Wed, 05 May 2010 02:14 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
POST-CHANGE? Or, rather, WHEN-VALIDATE-ITEM?
Re: text changed trigger [message #454341 is a reply to message #454340] Wed, 05 May 2010 02:28 Go to previous messageGo to next message
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 #454343 is a reply to message #454341] Wed, 05 May 2010 02:36 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What is wrong with an LOV?

AND USE 'CODE' TAGS!!!

David
Re: text changed trigger [message #454347 is a reply to message #454341] Wed, 05 May 2010 02:42 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
But, what you do is what Forms already has - why reinventing the wheel? Press <Enter query>, enter value into the "subject" item, press <Execute query>.
Re: text changed trigger [message #454348 is a reply to message #454347] Wed, 05 May 2010 02:51 Go to previous messageGo to next message
ghadeer
Messages: 25
Registered: February 2010
Location: ksa
Junior Member
I Know that is already exist , but I want to change the layout and background color of lov
--am using form 6i

[Updated on: Wed, 05 May 2010 02:51]

Report message to a moderator

Re: text changed trigger [message #454490 is a reply to message #454348] Thu, 06 May 2010 01:42 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Then create another canvas which is based on 'tabel_name' and then change its background colour, etc, and use it as your LOV.

David
Re: text changed trigger [message #454549 is a reply to message #454490] Thu, 06 May 2010 04:17 Go to previous message
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.
Previous Topic: Sending mail with attachment
Next Topic: how to use updated temptable data in report (merged by CM)
Goto Forum:
  


Current Time: Fri Sep 20 09:37:25 CDT 2024