text item navigation [message #255661] |
Wed, 01 August 2007 07:32  |
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 #256215 is a reply to message #256126] |
Fri, 03 August 2007 07:49   |
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   |
 |
Littlefoot
Messages: 21823 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 #256670 is a reply to message #256309] |
Mon, 06 August 2007 05:20   |
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
|
|
|
|
|