Home » Developer & Programmer » Forms » how to inherit list item (10g Application Server win xp)
how to inherit list item [message #339740] Fri, 08 August 2008 05:42 Go to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Hi,

I want to inherit the list item made in one form to all the other forms, is it possible?

Attached is the screen shot of the requirement page. The date format used here has to be replicated in all the other forms. Each of the date components (DAY, MONTH, YEAR) have to be used in other forms. Is it possible to make then into one object and use it in all the forms? if yes then how?
  • Attachment: rek_page.GIF
    (Size: 69.24KB, Downloaded 108 times)
Re: how to inherit list item [message #339759 is a reply to message #339740] Fri, 08 August 2008 06:49 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
a) parameter
b) global variable
Re: how to inherit list item [message #339876 is a reply to message #339759] Sat, 09 August 2008 05:59 Go to previous messageGo to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Thanks for the reply.

It seems that Parameter would be tedious process as according to the online help

Quote:
You cannot add a parameter of type DATA_PARAMETER if the parameter list is being passed to another form


I need to pass the numbers (days, years) to another form and adding them individually to the parameter list would take a lot of time and this will not allow me to add a record group.

I planned to use global variables but not able to proceed further. As shown in the screen shot attached I want to make global variable from LS_DAY, LS_MONTH, LS_YEAR. I created a WHEN_NEW_BLOCK_INSTANCE and tried to enter this code in it but came across error

declare	
	:global.my_date:= to_char(db_requirement.ls_date);	
begin
	null;
	end;


Quote:
Encountered the symbol "" when expecting one of the following begin..


Quote:
Encountered the symbol "end-of-file" when expecting one of the following begin..


I got the global variable initialization code from the online help and thought that this will create a global variable which I can use the other date block in the other form.

Is my logic wrong or is there a syntax error?
Re: how to inherit list item [message #339903 is a reply to message #339876] Sat, 09 August 2008 09:39 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You don't DECLARE a global variable; you simply initialize it with a value, such as
:global.my_date := to_char(:block.date_item, 'dd.mm.yyyy');

Or, you can use the DEFAULT_VALUE built-in as
default_value(to_char(:block.date_item, 'dd.mm.yyyy'), 'global.my_date');
Re: how to inherit list item [message #339911 is a reply to message #339903] Sat, 09 August 2008 12:00 Go to previous messageGo to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Thanks for the reply,

where do I initialize the variable? In a trigger, in procedure or somewhere else...can you show me an example please
Re: how to inherit list item [message #339914 is a reply to message #339903] Sat, 09 August 2008 12:58 Go to previous messageGo to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
I am eagerly waiting for your reply but I think I can do the same thing with object libraries right!! I just created an object library and subclasses the items in it to the RDC_SUBMISSIONS form and it worked fine.

but please answer my query on the global variable...
Re: how to inherit list item [message #339922 is a reply to message #339914] Sat, 09 August 2008 14:19 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
where do I initialize the variable

Wherever you find it appropriate.
Previous Topic: To attach a library in a Form
Next Topic: PRBLEM IN SIMPLE LOOP
Goto Forum:
  


Current Time: Sat Dec 10 20:53:34 CST 2016

Total time taken to generate the page: 0.07619 seconds