Home » Developer & Programmer » Forms » call data from 2nd from to 1st form (6i)
call data from 2nd from to 1st form [message #417418] Sat, 08 August 2009 02:04 Go to next message
kame
Messages: 69
Registered: July 2009
Member
I have 2 forms
one form have a button to call 2nd form
when I click on button (form 1)
I create a button in form 1 the code is

call_form('so_view01',no_hide);

------------- update variable from 2nd form into form 1 ----------
    :masterdo.sono := :global.sono;
    :masterdo.sodate := :global.sodate;
    :masterdo.perscode := :global.perscode;
    :masterdo.persname := :global.persname;
    :masterdo.commission := :global.commission;
    :masterdo.netrate := :global.netrate;
message ('Main'||:global.itemname);	
message ('...');	
BEGIN
GO_BLOCK('do_detail');
LOOP
     :do_detail.itemcode := :global.itemcode;
    :do_detail.itemname := :global.itemname;
    :do_detail.itemunit	:= :global.itemunit;
    :do_detail.dorate := :global.sorate	 ;
   	:do_detail.doqty := :global.soqty;
    :do_detail.disc_pers:= :global.disc_pers;
    :do_detail.disc_amount:= :global.disc_amount;
   :do_detail.tax_perc:= :global.tax_perc;
   :do_detail.tax_amount:= :global.tax_amount;
   :do_detail.netamount:= :global.netamount;
exit when :system.last_record = 'TRUE' ;
NEXT_RECORD;
END LOOP;
END;


the button open form and show the record in master detail
when I click on one record it has 1 master and 2 detail record
all the record I save in global variable successfully.
in 2nd form I use this button
---------------- Master View--------------
  :global.sono := :detailso_view.sono;
  :global.sodate := :detailso_view.sodate;
  :global.perscode := :detailso_view.perscode;
  :global.persname := :detailso_view.persname;
  :global.commission := :detailso_view.commission;
  :global.netrate := :detailso_view.netrate;
 
------------- detail View--------------
declare
 begin
 		go_block('masterso_view');
 	  first_record;
 	  loop
 	:global.itemcode := :masterso_view.itemcode;
  :global.itemname := :masterso_view.itemname;
  :global.itemunit := :masterso_view.itemunit;
  :global.itemname := :masterso_view.itemname;
  :global.sorate	 := :masterso_view.sorate;
  :global.soqty 	 := :masterso_view.soqty;
  :global.disc_pers := :masterso_view.disc_pers;
  :global.disc_amount := :masterso_view.disc_amount;
  :global.tax_perc := :masterso_view.tax_perc;
  :global.tax_amount := :masterso_view.tax_amount;
  :global.netamount := :masterso_view.netamount;  	
  message ('View'||:masterso_view.itemname);
 Exit When :System.Last_Record = 'TRUE';
    next_record;
   end loop;
  end;
 Do_Key ('Exit_Form');



when I exit this form I want that all the record will show at in form 1 (master detail)

why only single record showing in form 1 detail block.(see from 1 button code)?
Re: call data from 2nd from to 1st form [message #417437 is a reply to message #417418] Sat, 08 August 2009 10:23 Go to previous messageGo to next message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

hi,

Your question is confusing. What I understood from it is that you want to copy all the detail records from one form and paste them to the other form. From your code, you'll get only one record in your global variables because a global variable can hold one value only at any time. You're getting the last record values only in your global variables. That is why you are getting only one record in other form.

regards,
Saadat Ahmad

[Updated on: Sat, 08 August 2009 10:24]

Report message to a moderator

Re: call data from 2nd from to 1st form [message #417507 is a reply to message #417437] Sun, 09 August 2009 23:45 Go to previous messageGo to next message
kame
Messages: 69
Registered: July 2009
Member
ASA Sadat

You are right, kindly guide me what should I do now?

regards

Re: call data from 2nd from to 1st form [message #417543 is a reply to message #417418] Mon, 10 August 2009 02:51 Go to previous messageGo to next message
sharjeelshafqat
Messages: 33
Registered: August 2009
Location: Pakistan
Member

hi,
please first make sure , what you want to ask.
please brief your question
thanks
sharjeel
Re: call data from 2nd from to 1st form [message #417564 is a reply to message #417543] Mon, 10 August 2009 05:02 Go to previous messageGo to next message
kame
Messages: 69
Registered: July 2009
Member
I have 2 form

1st form call 2nd form
2nd form have 2 datablock master and detail
when I click on any record support record no 1
record no 1 has 1 record in master and 2 records in detail

I want to copy master detail record from from 2 to form 1.

Re: call data from 2nd from to 1st form [message #417569 is a reply to message #417564] Mon, 10 August 2009 05:31 Go to previous messageGo to next message
sharjeelshafqat
Messages: 33
Registered: August 2009
Location: Pakistan
Member

kame please send me your forms , I understand my self because i cannot understand what you want to say
thanks
Re: call data from 2nd from to 1st form [message #417576 is a reply to message #417569] Mon, 10 August 2009 05:49 Go to previous messageGo to next message
kame
Messages: 69
Registered: July 2009
Member
Kindly see the attached pic
  • Attachment: Form 1.png
    (Size: 21.18KB, Downloaded 111 times)
Re: call data from 2nd from to 1st form [message #417577 is a reply to message #417576] Mon, 10 August 2009 05:51 Go to previous message
kame
Messages: 69
Registered: July 2009
Member
Form 2./fa/6668/0/
  • Attachment: Form 2.png
    (Size: 27.12KB, Downloaded 208 times)
Previous Topic: runtime error ora-12703 when running utl_mail
Next Topic: open file *.pll --> error : PDE-PLI018 Could not find library NAME
Goto Forum:
  


Current Time: Sat Dec 10 01:07:54 CST 2016

Total time taken to generate the page: 0.08702 seconds