December 7, 200619 yr Hello, i was wondering if someone can help me with this. let say i have 20 records which i want to duplicate all at once. is there a way to do this using script?. i am using FM 6.0. any help would be appreciate it. thank you victor
December 8, 200619 yr 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. Regards Orlando
December 19, 200619 yr 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 Loop 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 December 19, 200619 yr by Guest
Create an account or sign in to comment