Step 1:
To begin, make two blocks in the data block. “Block4”
and “EMP”
· EMP block is database block.
· Block4 is manual block or non-database block.
In “EMP Block” just fetch the data from database.
In “Block4” just manually create two non-database
item.
· First one is text-item.
· Second one is button.
Step 2:
Following that, both goods were successfully produced. "Block4" requires a horizontal canvas.
Step 3:
Double-click on the "Block4" canvas after that. Then go back to the search box you created earlier. Create the "WHEN-BUTTON-PRESSED" trigger. F11 is a shortcut for listing down the triggers.
Then insert all of the code listed below into the "WHEN-BUTTON-PRESSED"
trigger.
DECLARE
V_BLOCK_VAL
VARCHAR2(100);
BEGIN
V_BLOCK_VAL
:= :BLOCK4.TEXT_ITEM6;
IF
GET_ITEM_PROPERTY('SEARCH',PROMPT_TEXT)='SEARCH' THEN
MESSAGE(GET_ITEM_PROPERTY('SEARCH',PROMPT_TEXT));
GO_BLOCK('EMP');
SET_BLOCK_PROPERTY('EMP',DEFAULT_WHERE,'SAL
LIKE '''||:BLOCK4.TEXT_ITEM6||'%'||'''');
SET_ITEM_PROPERTY('SEARCH',LABEL,'Search');
EXECUTE_QUERY;
ELSE
SET_BLOCK_PROPERTY('EMP',DEFAULT_WHERE,'');
SET_ITEM_PROPERTY('PUSH_BUTTON14',LABEL,'SEARCH');
END IF;
Step 5:
Now run the form. Button to run the form show in vertical toolbar.
Output:
If you have any problem so download the file to click on "Download".
Download
I hope it's helpful for you. If you have any queries, don't hesitate to contact me.
0 comments:
Post a Comment
If you have any doubts, please let me know. I will help you.