OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Create Duplicate Records

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
AgentZ86
Power User
Power User


Joined: 22 Feb 2009
Posts: 85

PostPosted: Fri May 01, 2009 3:40 am    Post subject: Create Duplicate Records Reply with quote

Hi

I created an inventory database

And I want to be able to duplicate records of similar of similar items.
Lets say (laserjet 2100dn) description,notes, dimensions etc. and I want to simply duplicate this as a new record.

Is there a way to use the control table or some method to duplicate an inventory item as a new record.

Each item is entered individually and has a primary key, so I know I can't duplicate the primary key because it's unique, but can you create new record from existing record ?

This would seem to be a function well needed especially for inventory or creating quotes to different contractors or things that are repetitive.

Please advise as this would really speed my inventory process up.

Currently I have to copy and paste each description from a previous record and past, then past other things as well, or perhaps go back and forth to the other record then type into the new record ?

Any help is greatly appreciated.
Thanks
Back to top
View user's profile Send private message
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Fri May 01, 2009 4:13 am    Post subject: Reply with quote

Hello

I think there is no easy way

but this link can maybe help you.

http://user.services.openoffice.org/en/forum/viewtopic.php?f=45&t=1169

I did remember me that Villeroy did point to this one

Maybe you can find more with

copy record
author Villeroy


Romke
Back to top
View user's profile Send private message
AgentZ86
Power User
Power User


Joined: 22 Feb 2009
Posts: 85

PostPosted: Fri May 01, 2009 10:44 am    Post subject: Duplicate Reply with quote

Hi,

Thanks, I think your right.

I'm wondering if I should go to html method of for my front end.

Something simple like creating a record and duplicating it should not be so hard, or maybe just hard for me.

Thanks again.
Back to top
View user's profile Send private message
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Fri May 01, 2009 3:31 pm    Post subject: Reply with quote

Hello

I did think a little more about your first question and what you wrote as answer. I think OOo-base is not the best program maybe for what you want.But I have no knowledge about other things.

What about your question about copy a record. If the record you want copy is part of a form then maybe there is a more easy solution.


when event change record
copy the values with basic to basic variables.
store record to the database.
store the basic variables to the new record.


Maybe this idea can help you a little. I did not test this idea.

Romke
Back to top
View user's profile Send private message
AgentZ86
Power User
Power User


Joined: 22 Feb 2009
Posts: 85

PostPosted: Sat May 02, 2009 5:00 pm    Post subject: Sounds Great Reply with quote

Hi that sound good

But I don't think I understand how to implement this.

This would be code ? no doubt ?

Thanks
Back to top
View user's profile Send private message
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Sun May 03, 2009 5:20 am    Post subject: Autofill Reply with quote

Hello AgentZ86

Most things need macros. I have learned that how more you understand the API and the forms how easier the macros can be. Not if you want real difficult things.

Relation between the two records?
a)The record you want copy is the source in the mainform and the destination in a subform?
b) they are both in the same (sub)form and the next one must have the value from the previous one

How much fields must be copied?


This is an expample of code for one field. The macro do follow each other
Code:
Sub Autofill(oEvent as Object)
'bound to before record change
if oEvent.source.implementationname="com.sun.star.comp.forms.ODatabaseForm" then
   dim oGrid,oTextfield
   oGrid=oEvent.source.getbyname("MainForm_Grid")
   'the next two lines must be repeated for every field.
   'Maybe the defaulttext and text properties must have an other name
   oTextfield=oGrid.getbyname("plaats")
   oTextfield.DefaultText=oTextfield.text
end if
End Sub


Romke
Back to top
View user's profile Send private message
AgentZ86
Power User
Power User


Joined: 22 Feb 2009
Posts: 85

PostPosted: Mon May 04, 2009 3:24 am    Post subject: duplicate Reply with quote

HI
Thanks

I'll try a few things.

But I want to copy a complete record meaning = a whole row including all fields except the auto interger fields. which a new record will be a duplicate of the other, and then I can edit and make a few changes if I want.

For example I sell items on ebay.

I want to enter a description, actual weight,actual dimensions, then I may have a simlar or exact duplicate of this item with perhaps a minor different such as a scrape or some plastic missing or something. But otherwise the description is the same.

So I just want to duplicate every field in that record and create a new record, so that I don't have to enter the information over and over again. Just make a few minor changes.

Perhaps I may have to use a listbox for the description field instead, but then I'm not sure how to add new items to the list box and duplicate that record as new record either, I think this would be the same subject all over again.

But I will try to look into your macro topic, but I'm going to study html, and php forms now because it's starting to look like I may not be able to do what I want with OpenOffice Base, but I should it seems a simple enough topic in appearance.

Thanks again for any help, I'll keep working on this.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group