Home » Developer & Programmer » Forms » Customized Master-Detail Form
Customized Master-Detail Form [message #288380] Mon, 17 December 2007 05:17 Go to next message
manimee
Messages: 13
Registered: August 2007
Junior Member
Hi all,

I m preparing a Master-Detail form which is independent and not based on any tables. To save record, i insert a push_button and wrote insert code for master data and it is ok.

But how can i save detail data. I cannot use first_record/next_record as the data is independant. Help me how can i open a loop? and how can i save all rows ?

Thanks
Re: Customized Master-Detail Form [message #288382 is a reply to message #288380] Mon, 17 December 2007 05:27 Go to previous messageGo to next message
timor
Messages: 12
Registered: December 2007
Location: egypt
Junior Member
dear you can make a loop on the first block to save it first and exit when it is at the last record
and do the same thing for the second block
the point here is to exit the loop where :system.last_record
and it will work good
salam
Re: Customized Master-Detail Form [message #288391 is a reply to message #288382] Mon, 17 December 2007 05:52 Go to previous messageGo to next message
manimee
Messages: 13
Registered: August 2007
Junior Member
Thanks.
But i didnt use any loop for the first block as it has only one row.
Re: Customized Master-Detail Form [message #288527 is a reply to message #288391] Mon, 17 December 2007 23:08 Go to previous messageGo to next message
manimee
Messages: 13
Registered: August 2007
Junior Member
Now i m able to save only one row of detail block, where the cursor is placed and rest of the rows not saved. Hope some one can help me.

Thanks
Re: Customized Master-Detail Form [message #288569 is a reply to message #288380] Tue, 18 December 2007 00:59 Go to previous messageGo to next message
dude4084
Messages: 222
Registered: March 2005
Location: Mux
Senior Member
Timor has give you the perfect idea.

Let me guide you little bit more.

1) for detail block, got to top record (record no 1) by using command First_record (see help if my syntax is wrong)

2) then use LOOP till you find last record with the help of :system.last_record


3) commit record in the loop


I hope that this guide will be enough to solve your problem.
Re: Customized Master-Detail Form [message #288670 is a reply to message #288569] Tue, 18 December 2007 04:55 Go to previous message
manimee
Messages: 13
Registered: August 2007
Junior Member
I did as you said and i got it done.
Thanks to all
Previous Topic: To assign a value to a field
Next Topic: error when changing item visual attribute property
Goto Forum:
  


Current Time: Fri Sep 27 08:24:25 CDT 2024