on change trigger to filter [message #659042] |
Wed, 04 January 2017 16:10  |
 |
dstran
Messages: 7 Registered: August 2015 Location: md
|
Junior Member |
|
|
How can I filter results as the user is typing?
I have a contact list form with first name, last name, email ...
and would like to narrow down the results as the user is typing.
something like on_change trigger execute query based on the value typed?
thank you.
|
|
|
|
|
Re: on change trigger to filter [message #659077 is a reply to message #659042] |
Thu, 05 January 2017 11:37   |
 |
dstran
Messages: 7 Registered: August 2015 Location: md
|
Junior Member |
|
|
Solution
Create a List->Combo box as the search filter input item
Create a When-List-Changed trigger
DECLARE
c_where VARCHAR2(100);
Blk_Id BLOCK;
BEGIN
c_where := 'last_name like '''|| :your block.last_name_search||'%''';
Blk_Id := find_block('your block');
Set_block_Property (Blk_Id , default_where, c_where);
execute_query;
END;
Not the most elegant but does what I need.

[mod-edit: code tags added and image inserted into message body by bb]
[Updated on: Thu, 05 January 2017 16:43] by Moderator Report message to a moderator
|
|
|
|