Oracle Forms 11g WHEN-BUTTON-PRESSED [message #628244] |
Fri, 21 November 2014 12:58 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
deay
Messages: 62 Registered: August 2005
|
Member |
|
|
hi everyone
I'm designing my first oracle forms project. I have the Master/Detail working correctly. the form looks for Customer info and related detail data.
in order to query the data via customer idnumber you have the enter_query, execute_query icons on the toolbar.
instead of using the toolbar I would like to create a custom button for users to press, then enter customer id then execute automatically.
my trigger code is something like this:
WHEN-BUTTON-PRESSED
enter_query;
GO_ITEM('CUSTOMER.IDNUMBER');
execute_query;
however this is not working, any help or tips on how I can get this to work would be greatly appreciated.
thanks in advance.
|
|
|
Re: Oracle Forms 11g WHEN-BUTTON-PRESSED [message #628250 is a reply to message #628244] |
Fri, 21 November 2014 16:14 ![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) |
![](http://www.gravatar.com/avatar/1229663c86eb1a441385fe710cd9116e?s=64&d=mm&r=g) |
mughals_king
Messages: 392 Registered: January 2012 Location: pakistan
|
Senior Member |
|
|
No No No not like that my friend. Okay ! you are going to create first form thn let me explain you little basic things regarding related to enter_query, Execute_query, go_item, go_block.
"Enter_query" Procedure
Clears the current block and creates a sample record.
Operator can the specify query conditions before executing the query with a menu or button
command. If there are changes to commit the form builder prompts the operator to commit them
before continuing ENTER_QUERY processing
"Execute_query" Procedure
Clears the current blocks opens the query and fetches a number of selected records. if there are
changes to commit forms builder prompts the operator to commit them
before continuing EXECUTE_QUERY processing.
"Go_block" procedure
Navigates to the specified block.
"Go_item" procedure
Navigates to the specified item.
just chk attached example fmb file.
Regard
Mughal
[Updated on: Fri, 21 November 2014 16:17] Report message to a moderator
|
|
|
Re: Oracle Forms 11g WHEN-BUTTON-PRESSED [message #628280 is a reply to message #628244] |
Sat, 22 November 2014 07:53 ![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) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
deay wrote on Fri, 21 November 2014
instead of using the toolbar I would like to create a custom button for users to press, then enter customer id then execute automatically.
I don't use Forms 11g (but I doubt that these things have changed). So: once you enter query mode (ENTER_QUERY built-in in your WHEN-BUTTON-PRESSED trigger), Forms waits for user to enter search criteria (which is optional; you don't really have to enter anything) and execute query (normally, you do that by pushing the appropriate button in the toolbar or use keyboard shortcut). You can't "jump" into enter query mode and do anything; GO_ITEM is ignored, EXECUTE_QUERY is ignored, everything is ignored - you have to do that manually, which means that you need two buttons - one to enter query mode, another one to execute query.
Having said that, it appears that what you are doing is in vain as both of these buttons already exist in Forms' toolbar and do their job well. So, stop reinventing the wheel.
|
|
|
|