Home » Developer & Programmer » Forms » Duplicate Record
Duplicate Record [message #180053] Fri, 30 June 2006 00:22 Go to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
I have enter one reocrd is there any possibity that when i go for enter new record prv. record (duplicate) show me because many text same as prv. record.

Re: Duplicate Record [message #180054 is a reply to message #180053] Fri, 30 June 2006 00:41 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
While in form, press <Ctrl + K> - it will show you list of all available actions. One of them is "duplicate record". Or, in the form menu, select Record - Duplicate Record.
Re: Duplicate Record [message #180062 is a reply to message #180054] Fri, 30 June 2006 01:23 Go to previous messageGo to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
I tried but shows error

FRM-41802 Duplicate record function allowed on new record
and when I inserted new recored after that:-

FRM-41803 No previous record to copy value form




Re: Duplicate Record [message #180065 is a reply to message #180062] Fri, 30 June 2006 01:36 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
When copying records, existing record must be above the current empty record.
Re: Duplicate Record [message #180124 is a reply to message #180065] Fri, 30 June 2006 04:04 Go to previous messageGo to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
I have master and detail record master record allow to duplicate but detail

[Updated on: Fri, 30 June 2006 04:12]

Report message to a moderator

Re: Duplicate Record [message #180126 is a reply to message #180124] Fri, 30 June 2006 04:12 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
I see, you want to copy the details along with the master. I'd create a procedure on the database for that, I think. That procedure would be called from forms. It is not something that's built in in Forms.

MHE
Re: Duplicate Record [message #180127 is a reply to message #180126] Fri, 30 June 2006 04:14 Go to previous messageGo to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
Thank You
I am waiting....
Re: Duplicate Record [message #180129 is a reply to message #180127] Fri, 30 June 2006 04:23 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
kamran.it wrote on Fri, 30 June 2006 11:14

Thank You
I am waiting....
Waiting? No, you should be programming! Your procedure won't write itself! Although I have a pretty wide imagination I am not psychic and I don't have a crystal ball so I can't write it for you. Besides, a small procedure with 2 inserts can't be that hard.

possible framework

procedure dup_rec(<p_master_key> in <master_key_type>)
is
  <v_new_key> <master_key_type>;
begin
  -- create a master
  INSERT INTO <master_table>(<columns>)
  SELECT <columns>
  FROM   <master_table>
  WHERE  <master_key> = <p_master_key>
  RETURNING <new_key> INTO <v_new_key>;
  
  
  -- create details
  INSERT INTO <detail_table>(<columns>,...., <master_key>)
  SELECT <columns>,.....,<v_new_key>
  FROM   <detail_table>
  WHERE  <master_key> = <p_master_key>;
EXCEPTION
  <your_exception_handling>
end dup_rec;


Off you go.

MHE

[Updated on: Fri, 30 June 2006 04:26]

Report message to a moderator

Re: Duplicate Record [message #180157 is a reply to message #180129] Fri, 30 June 2006 07:14 Go to previous messageGo to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
Yes , I tried to do programming actual I get new ideas from here I learn oracle through web and orafaq.com I dont have much exp. in oracle recently 3 mmonths, i am using oracle.
Re: Duplicate Record [message #180160 is a reply to message #180157] Fri, 30 June 2006 07:37 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
And did the template help? If you have written your procedure you simply call it from forms (create a button for it, or a menu item).

MHE
Previous Topic: Currency Group Separator
Next Topic: Restric form use
Goto Forum:
  


Current Time: Fri Sep 20 08:16:48 CDT 2024