Home » Developer & Programmer » Forms » i am getting error while running form with stack canvas (forms6i)
i am getting error while running form with stack canvas [message #348793] Wed, 17 September 2008 23:46 Go to next message
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 331 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 #348801 is a reply to message #348793] Thu, 18 September 2008 00:00 Go to previous messageGo to next message
subba99
Messages: 31
Registered: September 2008
Member
[EDITED by DJM: remove repeated entry and 576k JPG file that contained image which said "FRM-41805: Ambiguous item name: ROWID."]

[Updated on: Thu, 18 September 2008 00:27] by Moderator

Report message to a moderator

Re: i am getting error while running form with stack canvas [message #348815 is a reply to message #348801] Thu, 18 September 2008 00:31 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Please read the posting guidelines.

According to your first entry, you have written code in your form. Somewhere in it you have referenced 'rowid'. I assume you have two blocks. I surmise that you have tried to join these two tables via 'rowid' (bad idea!) and not prefixed them by either their table name, alias name, or block name.

Search your form for 'rowid' and if you don't understand why it isn't working then post THAT code, not the whole form.

David
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 Go to previous messageGo to next message
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 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT 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 Go to previous messageGo to next message
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 #349109 is a reply to message #349103] Thu, 18 September 2008 23:18 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
With which part of "PLEASE!!! Format your code and stop with all the extra blank lines!!!" are you having a problem?

Yes, I know there will be 'Please acknowledge' displays. What I want to know is what the message text showed you? Can you 'see' the loop showing you the various item names? What does the message tell you when you are on the last item in the block?

David
Re: i am getting error while running form with stack canvas [message #349133 is a reply to message #349109] Fri, 19 September 2008 00:49 Go to previous messageGo to next message
subba99
Messages: 31
Registered: September 2008
Member
hi david
I format the code and also remove the blank lines even though i am getting same messages when i am in last item in the block


no,i am not seeing the various items names in a loop
Re: i am getting error while running form with stack canvas [message #349443 is a reply to message #349133] Sun, 21 September 2008 20:53 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Then your 'message;pause;' pairs are not IN the loop. Put them IN the loop, look at what they say, and tell us the name of the item when the loop is processing the last item.

David
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 Go to previous messageGo to next message
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 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT 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
Previous Topic: Enabling/Disabling checkboxes
Next Topic: menu source--database
Goto Forum:
  


Current Time: Fri Dec 09 11:29:50 CST 2016

Total time taken to generate the page: 0.09869 seconds