To copy data from one datablock to another [message #557966] |
Mon, 18 June 2012 06:18 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/eeed21864f80e5fa549e3c52be037eea?s=64&d=mm&r=g) |
poojamunj
Messages: 64 Registered: May 2011 Location: MUMBAI
|
Member |
|
|
Hi,
I am developing an application for making the travel entries for my organization employees.
For that purpose I have 3 datablocks named:
1) Travel header
2) Employee Detail
3) Travel Detail
which are interlinked through constraints.
I want to give 2 options ie. either single booking entry or Group booking entry.
The form is working properly for single booking entry. But when I want to make a group booking wherein many employees have to travel between common locations I have to fill all the travel details again for all employees. I want to avoid that since it wont give a feasibility for this application.
Can you give me any idea through which I can copy the travel details I have entered for the 1st employee. I am uploading the form layout. Please have a look and suggest me any idea which can help me to make group booking.
|
|
|
Re: To copy data from one datablock to another [message #557969 is a reply to message #557966] |
Mon, 18 June 2012 06:30 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Are employee details and travel details blocks master-detail blocks? If so, I don't know how to do what you are asking. Because, as soon as you switch to another employee, travel details block will be emptied, waiting for you to enter new values.
Perhaps you could create a view (join employees and travels) and create a form based on that view. A form record would then contain all information in the "same line". That record might be rather long, so you might need to create a stacked canvas (which offers a horizontal scrollbar).
After entering values for the first employee, you'd navigate to the next record and (either by shortcut keys or form menu) "duplicate record". Of course, you'd modify values related to an employee, while travel information would remain the same.
Do inserts, updates and stuff with INSTEAD OF triggers.
Hopefully, someone else will have a better and simpler idea.
|
|
|
|
Re: To copy data from one datablock to another [message #558437 is a reply to message #558071] |
Fri, 22 June 2012 02:12 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.gravatar.com/avatar/eeed21864f80e5fa549e3c52be037eea?s=64&d=mm&r=g) |
poojamunj
Messages: 64 Registered: May 2011 Location: MUMBAI
|
Member |
|
|
Well I got a solution over my problem. Whenever I am inserting a new travel detail, the record is geting inserted in a global temporary table. Now when I am adding a new employee it prompts a message "Wether you want to duplicate the record", as i click on yes, I am retrieving the data from global temporary table through a cursor.
But the problem I am facing here is , if there are 2 travel details, the cursor is fetching those 2 details but the pointer is comming to the next record which is blank, hence evrytime I have to click on delete button to delete that row and then keep on adding new employees.
In the end of the cursor I do wrote first_record. By using this, I am not getting that blank record but whenever I adding a new employee though a list, it is getting replaced by the previous employee detail i.e the 2nd record of employee detail is getting overwritten.
How can i built this flow in a proper way.
please sugest some idea.
thanks.
|
|
|