Masum's Blog

.

Creating Search Button in Oracle Forms.

Process:
1. create a block in your form.
2. create another block 'search' for search button.(it's not mendatory)
3. create a text_item and a push_button in the search block.
4. go to text_item property and change the database item 'No'.
5. In the search block create a trigger
 'WHEN-NEW-FORM-INSTANCE'('EXECUTE_QUERY')

6. In the push_button create a trigger 'WHEN-BUTTON-PRESSED'

THIS TRIGGER FOR NUMBER VALUE SEARCH
begin 
SET_BLOCK_PROPERTY('BLOCK_NAME',DEFAULT_WHERE,
'search_item'= '||':search_block_name.search_text_item');
go_block('BLOCK_NAME');
execute_query;
SET_BLOCK_PROPERTY('BLOCK_NAME',DEFAULT_WHERE, ''); 
end;


THIS TRIGGER FOR CHAR VALUE SEARCH
begin 
SET_BLOCK_PROPERTY('BLOCK_NAME',DEFAULT_WHERE,
'UPPER(search_item) like '''||upper(:search_block.search_text_item)||'%'||'''' );
go_block('BLOCK_NAME');
execute_query;
SET_BLOCK_PROPERTY('BLOCK_NAME',DEFAULT_WHERE, ''); 
end; 

7. compile those trigger.
8. save
9. run form.

If you want to view the video tutorial of Creating search item, then click here...

I think it will be helpful to you.
thanks.

















2 comments:

Theme images by billnoll. Powered by Blogger.