Home » Developer & Programmer » Forms » text item navigation
text item navigation [message #255661] Wed, 01 August 2007 07:32 Go to next message
sauk
Messages: 29
Registered: June 2007
Junior Member
Hi friends,

I have a problem in navigating through text items.

My datablocks contains several navigation items( datatype is varchar2).For a particular item, if a condition is satisfied, i've to return the value to the database and then navigate to a particular item.I tried using 'GO_ITEM' which is not working.But if i use 'NextNavigationItem' its always skipping to the item without satisfying the condition.Please could anyone help me?

thanks
sera
Re: text item navigation [message #255808 is a reply to message #255661] Wed, 01 August 2007 16:09 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What does it mean: "GO_ITEM is not working". Do you get an error message? If so, which one. If not, what happened?
Re: text item navigation [message #255875 is a reply to message #255661] Thu, 02 August 2007 04:20 Go to previous messageGo to next message
sauk
Messages: 29
Registered: June 2007
Junior Member
When i write go_item('block.item')inside an if condition,cursor is not going to the specified item.it is jus navigating to the next item in the block.

thanks
sera

[Updated on: Thu, 02 August 2007 04:26]

Report message to a moderator

Re: text item navigation [message #255916 is a reply to message #255875] Thu, 02 August 2007 06:25 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It seems that GO_ITEM is not executed at all, but the navigation is done - by default - to the next item in current block.

Check it using a debugger or, if your version doesn't have it, by writing several MESSAGE statements so that you could follow code execution.
Re: text item navigation [message #255927 is a reply to message #255916] Thu, 02 August 2007 07:34 Go to previous messageGo to next message
sispk6
Messages: 164
Registered: November 2006
Location: pakistan
Senior Member
check the name of item inside single quotes
Re: text item navigation [message #256022 is a reply to message #255927] Thu, 02 August 2007 14:45 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I wouldn't say so; if item name was wrong, he'd get "Unable to resolve reference to item" error which is NOT happening.
Re: text item navigation [message #256126 is a reply to message #255661] Fri, 03 August 2007 01:57 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
In which trigger are you doing this?

David
Re: text item navigation [message #256215 is a reply to message #256126] Fri, 03 August 2007 07:49 Go to previous messageGo to next message
sauk
Messages: 29
Registered: June 2007
Junior Member
I am pretty new to oracle forms.Jus learning and doing the project.so please forgive my ignorance in this.

I want to move the input focus from a source item to a target item(data type of both the text items are varchar2) in the same block.I am using when_validate_item to check for the inputs.when the input value is '2' i 've to write it to the database as well as move to the target item.i know that its not possible to use built ins in when_validate _item.so i used post_text_item which is giving an error "illegal restricted procedure 'go_item'in post_text_item trigger".so could you please guide me which trigger will work for the navigation item.

Thanks
sera
Re: text item navigation [message #256309 is a reply to message #256215] Fri, 03 August 2007 14:48 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You can not use restricted procedures (any built-in procedure that initiates navigation) in triggers that fire in response to navigational events (any of PRE- or POST- triggers; you've already discovered the WHEN-VALIDATE-ITEM trigger).

Therefore, you'll have to use allowed combination; one of those might be KEY-NEXT-ITEM trigger + GO_ITEM.

Another option would be using the WHEN-VALIDATE-ITEM trigger without GO_ITEM, but restricting navigation to (some) item(s), for example
-- first, make items navigable
set_item_property('dname', navigable, property_true);
set_item_property('loc', navigable, property_true);

-- depending on item's value, make other items non-navigable
if :deptno < 10 then
   set_item_property('dname', navigable, property_false);
else
   set_item_property('loc', navigable, property_false);
end if;
Re: text item navigation [message #256612 is a reply to message #256309] Mon, 06 August 2007 02:13 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Key-up and key-down permit 'restricted procedures'. So you can always set the name of the field to which you wish to jump in the 'when-validate-item' trigger and then in some routine which is called in the key-up, key-down, key-commit, etc you check to see if the 'global' it set and if it is, you do a 'go_item' to that field. Then show a 'message' and do a 'raise form_trigger_failure' to stop the processing.

David
Re: text item navigation [message #256670 is a reply to message #256309] Mon, 06 August 2007 05:20 Go to previous messageGo to next message
sauk
Messages: 29
Registered: June 2007
Junior Member
regarding set_item _property

Do i 've to set all the item's(which has to be skipped)set_item_property to false.because when i set one item's property to false then its pointing to the next one instead of going to the target item.

thanks
sera
Re: text item navigation [message #256689 is a reply to message #256670] Mon, 06 August 2007 05:58 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Yes, all items which are placed BEFORE the target one.
Re: text item navigation [message #256733 is a reply to message #256670] Mon, 06 August 2007 08:15 Go to previous message
sauk
Messages: 29
Registered: June 2007
Junior Member
thanks a lot its working now!!!

thanks,
sera
Previous Topic: how i can print form
Next Topic: how to open a pdf
Goto Forum:
  


Current Time: Tue Dec 06 04:09:27 CST 2016

Total time taken to generate the page: 0.09117 seconds