i am getting error while running form with stack canvas [message #348793] |
Wed, 17 September 2008 23:46  |
subba99
Messages: 31 Registered: September 2008
|
Member |
|
|
i developed a form with stack canvas and content canvas
1)i placed empno,ename,job,deptno in contect canvas
2)i placed empno,mgr,hiredate in content canvas and also i maintain a relationship between these two canvases,and also i written a code for specific item
3)here my requirement is when job=manager it shows the stack canvas while navigating through tab in content canvas,for this also i wrote a trigger for job item
4)when stack canvas is display i want to disable and enable fields in stack canvas,for this salso i written a code,but i am getting error when i press disable button
here i am attaching example with error msg
please tell the solution if anyone knoes
regards
subba [EDITED by DJM: remove superfluous blank lines]
-
Attachment: STACK_CAN.fmb
(Size: 112.00KB, Downloaded 1308 times)
[Updated on: Thu, 18 September 2008 00:23] by Moderator Report message to a moderator
|
|
|
|
|
Re: i am getting error while running form with stack canvas [message #348840 is a reply to message #348815] |
Thu, 18 September 2008 01:42   |
subba99
Messages: 31 Registered: September 2008
|
Member |
|
|
hi
david thnks for your reponse
here i am sending code
1)i written this code in program units then i call this code in both disable and enable button with ITEM_ENABLE_DISABLE('EMP1',PROPERTY_OFF); ITEM_ENABLE_DISABLE('EMP1',PROPERTY_ON);
HERE 'EMP1' IS THE BLKNAME OF THE STACKED CANVAS
2)This code some executes correctly without error but some times it shows the error msg when i press disable button
PROCEDURE ITEM_ENABLE_DISABLE (BLKNAME VARCHAR2, ITEM_ON_OFF NUMBER) IS
NEXTITEMNAME VARCHAR2 (20);
ITEMCANVAS VARCHAR2 (20);
ITEMTYPE VARCHAR2 (20);
BEGIN
NEXTITEMNAME := BLKNAME || '.' || GET_BLOCK_PROPERTY (BLKNAME, FIRST_ITEM);
LOOP
ITEMCANVAS := GET_ITEM_PROPERTY (NEXTITEMNAME, ITEM_CANVAS);
ITEMTYPE := GET_ITEM_PROPERTY (NEXTITEMNAME, ITEM_TYPE);
IF ( (ITEMTYPE <> 'DISPLAY ITEM')
AND (ITEMCANVAS IS NOT NULL)
AND (GET_ITEM_PROPERTY (NEXTITEMNAME, ENABLED) = 'TRUE')) THEN
SET_ITEM_PROPERTY (NEXTITEMNAME, UPDATEABLE, ITEM_ON_OFF);
END IF;
NEXTITEMNAME := GET_ITEM_PROPERTY (NEXTITEMNAME, NEXT_NAVIGATION_ITEM);
IF NEXTITEMNAME = BLKNAME || '.ROWID' THEN
EXIT;
END IF;
END LOOP;
END; [EDITED by DJM: formatted the code, applied [code] tags, and removed superfluous blank lines]
[Updated on: Thu, 18 September 2008 18:53] by Moderator Report message to a moderator
|
|
|
Re: i am getting error while running form with stack canvas [message #349088 is a reply to message #348840] |
Thu, 18 September 2008 19:16   |
 |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
PLEASE!!! Format your code and stop with all the extra blank lines!!!
I suggest you place a 'message('next item is'||NEXTITEMNAME);pause;' before the 'IF NEXTITEMNAME' test in your loop.
I believe that you do not have a 'rowid' defined in this block. What is the value of 'NEXTITEMNAME' when you are at the last item?
David
[Change 'line' to 'item' in last paragraph.]
[Updated on: Thu, 18 September 2008 19:17] Report message to a moderator
|
|
|
Re: i am getting error while running form with stack canvas [message #349103 is a reply to message #349088] |
Thu, 18 September 2008 22:07   |
subba99
Messages: 31 Registered: September 2008
|
Member |
|
|
HI DAVID
In content canvas i write KEY-NEXT-ITEM trigger for JOB item like this
IF :EMP.JOB ='MANAGER' THEN
SHOW_VIEW('SCAN');
GO_item('EMP1.MGR1');
ELSE
NEXT_ITEM;
END IF;
when JOB ='MANAGER' then it shows stack canvas and then first it place the cursor in MGR1 item ,that wise it does not show NEXTI item is 'MGR1'
WHEN i place 'message('next item is'||NEXTITEMNAME);pause;' before the 'IF NEXTITEMNAME' test and then i RUN THE FORM and when press disable buttton I AM GETTING NEXTITEMNAME IS LIKE THIS
1)FIRST IT SHOW 'PLEASE ACKKNOWLEDGE' WHEN I PRESS OK NEXT IT SHOWS THEN IT REPEATS 3 TIMES 'PLEASE ACKKNOWLEDGE' AND THEN IT SHOWS
2) NEXTITEM IS 'ROWID' NET IT SHOWS
3) ' FRM -41805 AMBIGUOUS ITEM NAME IS ROWID' IT REPEATS 2
TIMES NEXT IT SHOWS
4) 'PLEASE ACKKNOWLEDGE' NEXT IT SHOWS
5)'NEXT ITEM IS ' (i..e it shows item name as blank)
6)next it shows 'frm-40105 unable to resolve reference item'
this it repeats three times next again it shows 'PLEASE ACKNOWLEDGE'
then it repeats the 4 ,5 and 6 steps continuously ,it is never comes out from form
|
|
|
|
|
|
Re: i am getting error while running form with stack canvas [message #349453 is a reply to message #349443] |
Sun, 21 September 2008 22:12   |
subba99
Messages: 31 Registered: September 2008
|
Member |
|
|
HI DAVID
WHEN i place pause; after message it showa the above message only ,when I remove pause; after message; it shows 'next item is rowid' when i press ok again it shows Ambiguous item name rowid' when i press ok it shows 'unable to resolve reference item name'
procedure item_enable_disable (blkname varchar2, item_on_off number) is
nextitemname varchar2 (20);
itemcanvas varchar2 (20);
itemtype varchar2 (20);
begin
nextitemname := blkname || '.' || get_block_property (blkname, first_item);
loop
itemcanvas := get_item_property (nextitemname, item_canvas);
itemtype := get_item_property (nextitemname, item_type);
if ( (itemtype <> 'DISPLAY ITEM')
and (itemcanvas is not null)
and (get_item_property (nextitemname, enabled) = 'TRUE')) then
set_item_property (nextitemname, updateable, item_on_off);
end if;
nextitemname := get_item_property (nextitemname, next_navigation_item);
message ('nextitem is' || nextitemname);
pause;
if nextitemname = blkname || '.ROWID' then
exit;
end if;
end loop;
end; [EDITED by DJM: formatted the code, applied [code] tags, and changed down from upper case]
[Updated on: Mon, 22 September 2008 19:21] by Moderator Report message to a moderator
|
|
|
Re: i am getting error while running form with stack canvas [message #349720 is a reply to message #349453] |
Mon, 22 September 2008 19:32  |
 |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
What do you mean by "the above message only"?
How many items are in your block?
Does the code show the block name as well as the item name?
The messages are displayed in the bottom left hand corner of the screen. Please tell us what is being displayed there.
David
|
|
|