Jump to content
Sign in to follow this  
Quartekoen

Easy record copy across tables?

Recommended Posts

I'm looking for a way to relatively easily backup records from one table to another. Each table has the same number of fields (except calculation fields in the second table, which aren't needed) and all field have the same name as their counterpart. I want to make a script that looks for all records at least X months old, copy it to another table, then delete the original.

So far, I've tried the actual 'Copy Record' action in ScriptMaker, but this just copies all the text, then pastes it all in the first field of the backup table. Preferrably, I would like to not go through each field and Copy/paste (or have a Set Field[] for every single one) and I was thinking about looping it. Something like:

Enter loop

Go to next field

Copy

Go to Backup Table

Paste

Go to next field (for the next paste in the loop)

Go back to first table

End loop

Is this even possible in this way? Any suggestions for a different type of backup script would also be greatly appreciated. Thanks.

Share this post


Link to post
Share on other sites

This "archiving" idea is usually achieved with an import from one table to another.

Share this post


Link to post
Share on other sites

I've done some experimenting with the exporting from one table and then importing into the other, and my only dislike of that is that there is a dialog on import asking the user to specify the details of it, and I'd much rather the process be as user-free as possible. Essentially, the user starts the Backup script, and it's done, with no other interaction required.

Share this post


Link to post
Share on other sites

I apologize. I thought I had checked for options on in the script for importing, but I only now saw the 'perform without dialog' box. Thanks again!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.