How to perform search detail block. [message #537038] |
Mon, 26 December 2011 05:40 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
irsathahamed
Messages: 12 Registered: April 2008 Location: UAE
|
Junior Member |
|
|
Hi everyone,
I have detail block in my form and i need to give option to user to search item in that block.
For example I display 100 items from item master and user need to search particular item by either code or name.
Please help me how will I do this?
Thanks for your help.
|
|
|
Re: How to perform search detail block. [message #537059 is a reply to message #537038] |
Mon, 26 December 2011 06:55 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/75489.jpg) |
azamkhan
Messages: 557 Registered: August 2005
|
Senior Member |
|
|
Create a mechanism that take values of item code or item name from user. Then naviagte each record to match the given values with the respected item. If found then message user that search found else search not found.
Tip: Use Loop...End Loop for this. Hope your problem will be solve
[Updated on: Mon, 26 December 2011 06:55] Report message to a moderator
|
|
|
Re: How to perform search detail block. [message #537100 is a reply to message #537059] |
Mon, 26 December 2011 13:11 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I'd use built-in Forms querying capabilities.
Once you navigate into a detail block (which contains many items):
- enter query mode
- enter search criteria (CODE, NAME, whatever)
- execute query
That's all, no additional coding is necessary. If you know how to efficiently query data, wow, you can do magic. For example, you can use wildcards. Or, you can use "Query Where" dialog box (in order to do that, enter - for example - ":a" (without double quotes, just colon a) and execute query - a dialog box will open. It allows you to specify conditions that are too complex to be specified by entering values into items (such as IN clause, subqueries, virtually anything). The best part of it is that you can use the same trick for ALL items (for example, if there are ID, NAME, DATE, you can enter :a, :b, :c for all those items and write your own criteria for each item. Really cool stuff.
So, I'd suggest you to learn how to use what Oracle provides by default. If you can't get the result, then go and write your own solution.
|
|
|
|
|
|
|