Home » Developer & Programmer » Forms » Getting the item type
Getting the item type [message #183601] Fri, 21 July 2006 08:52 Go to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
I was trying with the following code.
Declare
 Item_Type varchar2(60);
 item_count number:=0;
Begin

Item_Type:=GET_ITEM_PROPERTY(:system.curren_item, ITEM_TYPE);

If Item_Type IN ('TEXT ITEM') then

  item_count:=item_count+1;

  --Code to get the item values if the item is a text item ---
  -- for exporting the data to Excel ----

End if;

End;

I am doing this to get the item_count in the form (except buttons, images etc.,) and move all the text item data to Excel sheet.

But the statement
Item_Type:=GET_ITEM_PROPERTY(:system.curren_item, ITEM_TYPE);


does not return anything to the Item_Type variable.

Any one can suggest what should have gone wrong.

Thanks,

Nirmal.

[Updated on: Mon, 07 August 2006 01:59] by Moderator

Report message to a moderator

Re: Getting the item type [message #183632 is a reply to message #183601] Fri, 21 July 2006 11:49 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Is that a typo??

:system.curren_item.....
:system.current_item


if so, try to print that and see..

By
Vamsi.

[Updated on: Fri, 21 July 2006 11:53]

Report message to a moderator

Re: Getting the item type [message #183795 is a reply to message #183632] Sun, 23 July 2006 22:10 Go to previous messageGo to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
It was a typo, i changed it to
:system.current_item

still it does'nt work.

I am using Forms 10g

Thanks,

Nirmal
Re: Getting the item type [message #183950 is a reply to message #183795] Mon, 24 July 2006 09:05 Go to previous messageGo to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
Have any one faced this issue in Forms 10g ?


Thanks,
Nirmal
Re: Getting the item type [message #184776 is a reply to message #183950] Thu, 27 July 2006 22:48 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
In which trigger are you doing this? Do you KNOW that the statement has been executed? That is, have you displayed the data to the screen via 'message' statements.

David
Re: Getting the item type [message #184873 is a reply to message #184776] Fri, 28 July 2006 07:34 Go to previous messageGo to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
The statment is not getting executed at all, the program execution stops at this point. Thereafter no messages are getting displayed.


Thanks,

Nirmal N.
Re: Getting the item type [message #185090 is a reply to message #184873] Mon, 31 July 2006 00:09 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Can you display the current_item before the get_item_property statement?

By
Vamsi.
Re: Getting the item type [message #185202 is a reply to message #185090] Mon, 31 July 2006 08:35 Go to previous messageGo to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
Yes i can.

Thanks,

Nirmal
Re: Getting the item type [message #186214 is a reply to message #185202] Mon, 07 August 2006 02:00 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you solved your problem?

David
Re: Getting the item type - Bug with Forms 10g ? [message #187214 is a reply to message #186214] Fri, 11 August 2006 06:00 Go to previous messageGo to next message
nirmalnarayan
Messages: 261
Registered: April 2005
Location: India
Senior Member
i even tried the statment like this
Declare
it_id Item; 
ItemType Varchar2(255);
item_name varchar2(255):='YOUR_BLOCK.YOUR_ITEM';
BEGIN
 Message('1');
 Message('1');
 it_id := Find_Item(item_name); 
 Message('2');
 Message('2');
 ItemType:=Get_item_property(it_id,ITEM_TYPE);
End;
The program execution is not goind beyond the first Message.

Program halts without any response in the following statement.

it_id := Find_Item(item_name);

I am using FORMS 10g. I called Oracle support people, even they could not find a solution.

Is this a bug with Forms 10g ?

Thanks,

Nirmal

[Updated on: Mon, 14 August 2006 00:11] by Moderator

Report message to a moderator

Re: Getting the item type - Bug with Forms 10g ? [message #187433 is a reply to message #187214] Mon, 14 August 2006 00:47 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Okay.
1) Exactly which version of Forms 10g are you using and on which operating system?
2) Have you tried creating a new form and having only this code in your form?
3) Try Ctrl-Shft-K (compile all) and then Ctrl-T (Generate). It is possible that you are doing a Ctrl-K (Incremental Compile) and that may not be enough.

I can't find anything on metalink either.

David
Previous Topic: Query Problem
Next Topic: Trouble with :system.last_query
Goto Forum:
  


Current Time: Fri Sep 20 10:29:03 CDT 2024