Home » Developer & Programmer » Forms » How to get the value of the item (10g developer suite, 10g ,win xp)
How to get the value of the item [message #327211] Sun, 15 June 2008 02:12 Go to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Hi,

I am trying to get value of the value entered for the first item of a data block, following is the code that gets me the first item name but I am not getting the syntax to get the value entered for it

declare
  form_name varchar2(60);
  mstr_blk_name varchar2(60);
  dtls_blok_name varchar2(60);
  mstr_blk_item1name varchar2(60);
  mstr_blk_item1type varchar2(60);
  a number;	
  item_value number;
begin
	/*get the form name*/
	form_name := get_application_property(current_form_name);
	
	/*get the data block name*/
	mstr_blk_name := get_block_property(form_name, first_block);
	
	/*getting the first item on the block*/
	mstr_blk_item1name := mstr_blk_name||'.'||get_block_property(mstr_blk_name, first_item);


Now I want to get the value entered by the user for the item mstr_blk_name.mstr_blk_item1name, how can I do that?


Re: How to get the value of the item [message #327239 is a reply to message #327211] Sun, 15 June 2008 10:32 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Code you posted is invalid. First block can not be retrieved using the GET_BLOCK_PROPERTY, but GET_FORM_PROPERTY built-in. Item's value can be returned by NAME_IN.

So, here's how it goes:
form_name := get_application_property(current_form_name);
	
mstr_blk_name := get_FORM_property(form_name, first_block);     --> you made a mistake here

mstr_blk_item1name := mstr_blk_name||'.'||get_block_property(mstr_blk_name, first_item);
	
item_value := name_in(mstr_blk_item1name);
Re: How to get the value of the item [message #327302 is a reply to message #327239] Mon, 16 June 2008 00:17 Go to previous message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Thanks..it worked fine
Previous Topic: Unable to insert Record [FRM-40508]
Next Topic: simple query
Goto Forum:
  


Current Time: Fri Dec 09 08:15:09 CST 2016

Total time taken to generate the page: 0.10833 seconds