Home » Developer & Programmer » Forms » search/find word in a block
search/find word in a block [message #81171] Mon, 20 January 2003 10:34 Go to next message
Balaji
Messages: 102
Registered: October 2000
Senior Member
I have a set of 10 records in a block which contains
8-9 fields in it ..
I want to search/find on a particular word on a field
and go to the particular record in that group displayed and then to the next matching word until the end of the records

Pl help me on this
Re: search/find word in a block [message #81172 is a reply to message #81171] Mon, 20 January 2003 10:58 Go to previous message
Julie
Messages: 98
Registered: February 2002
Member
You have to write a looping routine. Something like this - I didn't test this, it is just to give you an idea.

DECLARE
cur_itm VARCHAR2(80) := :System.Cursor_Item;
cur_blk VARCHAR2(80) := :System.Cursor_Block;
lst_itm VARCHAR2(80);
BEGIN
--check for last item
lst_itm := cur_blk||'.'||Get_Block_Property(cur_blk,LAST_ITEM);
IF cur_itm = lst_itm THEN
-- check for last record
IF :System.Last_Record = 'TRUE' THEN
return;
ELSE
Next_Record;
END IF;
ELSE
Next_Item;
END IF;
cur_itm := :System.Cursor_Item;
if cur_itm = 'FIELD1' and
:myblock.field1 like '%string%' then
return;
elsif
cur_itm = 'FIELD2' and
:myblock.field2 like '%string%' then
return;
-- and so on

END;
Previous Topic: Mscal.ocx
Next Topic: date
Goto Forum:
  


Current Time: Fri Apr 26 14:23:38 CDT 2024