Home » Developer & Programmer » Forms » applying enter query logic
applying enter query logic [message #137456] Thu, 15 September 2005 05:26 Go to next message
orafaametta
Messages: 11
Registered: March 2005
Location: Hyb
Junior Member
Hi all
I have a small confusion,

I have placed the built in DO_KEY('ENTER_QUERY') in one of the menu item, named Enter Query.
It works fine when user selects the Enter Query option from menu.

But it does not work when user presses F7 key.To make this happen,apart from the code written for menu item(enter query), do i need to write KEY-ENTQRY trigger with Enter_query built-in?
If so is there any alternate way to achieve this.

Please suggest.
Re: applying enter query logic [message #137634 is a reply to message #137456] Thu, 15 September 2005 17:22 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I believe that F7 is currently mapped to 'key-scrup'. So to get F7 to do an 'enter_query' you need to create a key-scrup trigger and put DO_KEY('ENTER_QUERY') into it.

No, you don't have to write your own key-entqry trigger.

David
Re: applying enter query logic [message #137957 is a reply to message #137634] Mon, 19 September 2005 02:13 Go to previous messageGo to next message
orafaametta
Messages: 11
Registered: March 2005
Location: Hyb
Junior Member
Hi,

I observed that F7 key is associated with enter-query and is working fine,when i press F7 it moves the form into enter-query mode.
In the application as soon as form is in enter query mode some menu items(like exit,next,previous block and records) need to be disabled.
In the menu item named 'enter query' i have placed the logic to disable these items.

When user presses F7 the form shifts to Enter-query mode but menu items will not get alterted/disabled.

F8 also behaves in same manner,it queries data when user presses F8, but this will not disable any menu items required to be disabled in application,whereas, when execute query is initiated from menu...it quries the data and also disables the apropriate menu items.

In what way i should proceed so that apropriate actions can take place when user either selects the operation from menu item or presses a assoiated funcation key to execute the same operation.

Please suggest.
Thanks & Regards

Re: applying enter query logic [message #138073 is a reply to message #137957] Mon, 19 September 2005 18:31 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I am lazy - I only do the work that HAS to be done. My suggestion is that you TEACH the users the Oracle default function key pattern. But, of course, this is not acceptable by them. Such is life.

Yes, Oracle does do more than just go into 'enter-query' mode. You need to identify the names of the buttons you want to change and do set_item_property and disable or enable the items you don't or do want available to your user (I think) BEFORE you go into enter-query mode. Then, when they press execute-query, you swap the enabled and disabled buttons and then do the execute-query. You can do 'interesting' things like having the enter-query button to be double width and 'hide' the cancel and execute query buttons. But you lose the functionality associated with tapping the enter-query button a second time, that is, the show previous query functionality (which I like and most systems have killed). You can also change the background colour of the menu bar or the 'top' canvas, and display 'Query Mode' or 'Enter Mode' as a text on the menu, or somewhere else on the screen.

Also have a look at http://forums.oracle.com/forums/message.jspa?messageID=938325

Also on metalink, look at note Doc. 209671.1 - which talks about 'filename.res' and 'fmrweb.res'.

David

[Updated on: Mon, 19 September 2005 19:01]

Report message to a moderator

Re: applying enter query logic [message #138357 is a reply to message #138073] Wed, 21 September 2005 09:15 Go to previous messageGo to next message
orafaametta
Messages: 11
Registered: March 2005
Location: Hyb
Junior Member
Hi,
I have gone through the links you sent.It helped.
Default form builder function key's are appropriate to use.

I have following code for menu item named 'Enter Query'

Set_item_property('mnu.m_exit',enabled,property_false);
DO_KEY('ENTER_QUERY');

When users selects the operation from menu. It moves the form to enter query mode and also disables the 'exit' menu.

But when user presses f7, forms moves to Enter Query mode but it will not disable 'Exit' Menu item.

To achieve this in addition to the above code do i need to write a Key-Entqry trigger with following/same as above logic

Set_item_property('mnu.m_exit',enabled,property_false);
DO_KEY('ENTER_QUERY');

IS this the only the way to achieve this?
Is it not duplication of same logic at two different places?

Please suggest

Re: applying enter query logic [message #138423 is a reply to message #138357] Wed, 21 September 2005 21:50 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
To determine which trigger is firing, try running your form from the form builder but with debug turned 'on'. Also, put a message('I am here'); pause; command pair in each of your triggers under you KNOW that you trigger IS being called. To trap F7, I believe you need to have your code in a Key-F7 trigger, not in a Key-Entqry trigger.

David
Previous Topic: post_query
Next Topic: tooltip_text on multiple record data block problem
Goto Forum:
  


Current Time: Fri Sep 20 01:46:16 CDT 2024