Home » Developer & Programmer » Forms » To get item name dynamically and set a value to it
To get item name dynamically and set a value to it [message #220424] Tue, 20 February 2007 11:51 Go to next message
sachdeva_noor
Messages: 6
Registered: February 2007
Junior Member
hi,


i m working on a form .In one of the block of form ,i have 'n' number of items.

Problem is that i want to assign a value to the item, but item name is to be retrived dynamically. I will explain this:

Block : B1
Items: item1,item2 ....


from some query i am getting item name in a local variable
say, item_id

What i m trying to do is ,

:B1||'.'||item_id := some value

or something like this i m trying but in vain,



please tell me the proper solution

thanks
Re: To get item name dynamically and set a value to it [message #220487 is a reply to message #220424] Tue, 20 February 2007 19:52 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

If you happened to get the block and item IDs using Get_Block_Property and Get_Item_Property then you can do it.
Try this code and modify it using IDs that you've got.
DECLARE
  b	varchar2(20);
  i	varchar2(20);
  bi	varchar2(20);

Begin

  b := 'PDC_TRANS';
  i := 'NAME';
  bi := b||'.' ||i;


  copy('beeem', bi);		--works right
  copy('booom', b||'.'||i);	--can be this also

End;
Re: To get item name dynamically and set a value to it [message #220664 is a reply to message #220487] Wed, 21 February 2007 09:15 Go to previous message
sachdeva_noor
Messages: 6
Registered: February 2007
Junior Member
thanks
Previous Topic: who search by 2 values in forms
Next Topic: Problem with a button trigger
Goto Forum:
  


Current Time: Sun Feb 02 09:58:44 CST 2025