Home » Developer & Programmer » Forms » Navigate to another item in enter query mode (forms 9i)
Navigate to another item in enter query mode [message #328895] Mon, 23 June 2008 04:51 Go to next message
jheronimus
Messages: 11
Registered: March 2007
Location: The Netherlands, Groninge...
Junior Member
I have got a form with a single record block.
The form starts in enter query mode.
The cursor is located then in the first displayed item in the block.
Now I want to change the form, so that the cursor is placed automatically in the second displayed item in the block, when the form is started in enter query mode.

Does anyone know how to do this?

Jeroen de Jong
The Netherlands, Groningen.



Re: Navigate to another item in enter query mode [message #328910 is a reply to message #328895] Mon, 23 June 2008 05:26 Go to previous messageGo to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
In the WHEN-NEW-FORM-INSTANCE form level trigger

get the block name, then the first item name, get the next item name(get_item_property(item_name,next_navigation_item) then use GO_ITEM inbuilt property
Re: Navigate to another item in enter query mode [message #328911 is a reply to message #328895] Mon, 23 June 2008 05:26 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
The form starts in enter query mode.
I guess that you do that by having the ENTER_QUERY in the WHEN-NEW-FORM-INSTANCE trigger. Do you?

If so (and if not, do so), set "first displayed item's" queryable property to false. Here's an example of the WHEN-NEW-FORM-INSTANCE trigger:
set_item_property('deptno', queryable, property_false);
enter_query;
If necessary, set this property back to TRUE when appropriate.
Re: Navigate to another item in enter query mode [message #328914 is a reply to message #328910] Mon, 23 June 2008 05:30 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
durgadas.menon
... then use GO_ITEM inbuilt property

Everything seems to be fine but the quoted part of your message: you can't navigate when in query mode. Or, you can navigate BEFORE entering the query mode, but the navigation is lost once you enter query mode. Therefore, I believe that you should "disable" this item (there are ways to do that, but QUERYABLE property seems to be OK).
Re: Navigate to another item in enter query mode [message #328915 is a reply to message #328911] Mon, 23 June 2008 05:39 Go to previous messageGo to next message
jheronimus
Messages: 11
Registered: March 2007
Location: The Netherlands, Groninge...
Junior Member
This is very close to the solution.

However the user wants to start the form in enter query mode with the cursor in the second item, but he want's the possibility the navigate to the first item and query on the field ...

icon6.gif  Re: Navigate to another item in enter query mode [message #328921 is a reply to message #328915] Mon, 23 June 2008 06:21 Go to previous messageGo to next message
jheronimus
Messages: 11
Registered: March 2007
Location: The Netherlands, Groninge...
Junior Member
I already have a solution!

In the form object navigator --> datablocks --> items I selected the second item in the block with the mouse and I draged and dropped it so that it became the first in the block.

The form layout doesn't change, so the item looks still the second, but forms treads it now like it's the first.
Re: Navigate to another item in enter query mode [message #328922 is a reply to message #328915] Mon, 23 June 2008 06:25 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
In that case, switch these items in Object Navigator.

[EDIT]Huh, right; while I was talking on the phone, you found the solution. Good for you!

[Updated on: Mon, 23 June 2008 06:26]

Report message to a moderator

Re: Navigate to another item in enter query mode [message #329098 is a reply to message #328921] Tue, 24 June 2008 01:58 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
If you do it like this, you have to also change the next- and previous-navigation-item, or else using <TAB> to navigate through the fields will be an interesting exercise.
Previous Topic: need help on program unit
Next Topic: Fetch Query in control bolck
Goto Forum:
  


Current Time: Sun Feb 09 23:22:37 CST 2025