query mode [message #514868] |
Thu, 07 July 2011 01:53 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/125406a14a9c22b66f0063d55f68f1e8?s=64&d=mm&r=g) |
rajendaroracle
Messages: 80 Registered: May 2011 Location: India
|
Member |
![rajendaroracle](/forum/theme/orafaq/images/google.png)
|
|
hi,
I want to search values with F11.for example i will enter some value and i will press F11.it should be display that record. how can we do this? That block is populating values from code.
[Updated on: Thu, 07 July 2011 01:59] Report message to a moderator
|
|
|
|
|
Re: query mode [message #515013 is a reply to message #515007] |
Thu, 07 July 2011 13:41 ![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) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
I assume the line level block is a non-database block?
If so you can't put it into enter-query mode - that only works on database blocks.
|
|
|
|
|
Re: query mode [message #515247 is a reply to message #515212] |
Sat, 09 July 2011 04:54 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I must be quite stupid because I still don't understand what you are trying to do. Could you post a screenshot?
This is what I understood, so far: - there are two blocks in your form
- the first block (you call it a "header" one - I prefer "master") is a control block, which means that it is not based on a table
- the second block (you call it a "line level" block - I prefer "detail") is a database block - at least, that's what you said: Quote:
line level block is created on data base table
- this is how it works: you enter some values into master block items. Then you push the "FIND" button. The result should be displayed in the detail block, i.e. display all records from a table that satisfy condition entered into the master block.
- it means that you have a few options to do that:
- one is to - in WHEN-BUTTON-PRESSED trigger - use SET_BLOCK_PROPERTY and set detail block's ONETIME_WHERE property so that it looks like a WHERE clause in SELECT statement. It would ensure that only desired records are fetched
- or, in PRE-QUERY detail block trigger, set search criteria as
:detail.id := :master.id;
:detail.name := :master.name; etc.
WHEN-BUTTON-PRESSED on the "FIND" button should - somewhere at the end of the code - containGO_BLOCK('detail');
EXECUTE_QUERY; Now, I might be very wrong, but the above *should* be OK (at least, I hope so). If not, perhaps someone else got the point and will be able to assist - I'm out of ideas (and still wonder why you guys reinvent the wheel, when the querying functionality is built-in into Forms, and - if you do it as expected - Forms will do all of the dirty job for you. All you need to do is to make the form fancy, because it works by default).
|
|
|