Jump to content
Claris Platform 2023 Roadmap ×

is there way to duplicate a set of record

This topic is 6123 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I find the easiest way of doing this is using a script to export the records, as an .fp# file, and then re-importing the data.

There are numerous other ways but I find this to be the simplest.



Link to comment
Share on other sites

  • 2 weeks later...
  • Newbies

I have to do a simimlar thing in a solution where I duplicate a set of around 10 records max. Rather than export/import i use a loop.

I cannot paste the exact code right now but the premise is very simple, heres some psuedocode

Go to found set of records you wish to duplicate.

Set $counter to 1

Set $numRecords to get ( foundcount )

Go to first record


Go to record [ counter ]

Duplicate record

Omit record

Set counter to itself + 1

Exit loop if $counter > $numRecords

End Loop

Bit messy, but duplicating a record adds it to the found set and takes you to that last record in the found set, so you need to keep track of where you were in the original found set and go back to that record + 1. You omit the duplicate to maintain the size of the original found count (altho this may not be necessary but I do it anyways).

The reason I do this instead of export/import is if possible, I prefer to keep everything within the database and not have to export things to hard disk as if it is done without prompt there may be problems if paths become nonexistent, change etc.

Edited by Guest
Link to comment
Share on other sites

This topic is 6123 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

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