November 30, 200619 yr Newbies HI... newbie here A client has requested that I modify their existing Filemaker project in such a way that their users can click a button in order to duplicate all entries in a given record (i.e. client wants to duplicate record 250 of 500 and then just modify certain parameters). The problem is this: the Filemaker project consists of a layout that uses repeating fields from 2 separate tables: Sitems and Selection Form. The duplicate record function does create a new record, however the data that was in the original record is not carried forward to the newly created record. Can anyone provide some advice?
December 1, 200619 yr This is not so simple as it seem on first look. FileMaker does not care what is happening to related records. You have to script duplicating your record and related records ( on each related duplicate record you have to set RecordID to new original duplicated recordID ) Original recordID is 1, you duplicate it so it get recordID 2. Then you have insert 2 in each duplicated related record. HTH
December 1, 200619 yr Author Newbies Thanks for the advice... I found a roundabout, though admittedly not the best, way of accomplishing what I wanted. It is not elegant, but at least it works. I performed a Find on the record that was to be duplicated (i.e. 250 of 500) and then created an elaborate script that simply went back and forth between a new record and the current find, field repetition by field repetition, copying and pasting the data back and forth. The strobe-like effect of transitioning between records leaves me somewhat dizzy - harkening back to the drug ingesting 70s - but the client could not care less...it works, and that is all they wanted. Thanks
December 1, 200619 yr Hi Rick, The flashing can be elimiated by placing a Freeze Window script step before the back&forth process and a Refresh window script step after the process is done. HTH Tim
December 19, 200619 yr Newbies You could always - before duplicating - set a number of local script variables to the fields you wish to copy through, then do your duplication, go to the duplicate, and set the desired fields to the relevant local variable. That way if you set 20 fields, rather than going back & forth 20 times you can do it in 1. That'll fix the freeze issue to a significant degree, but I also agree with the previous poster that its best to leave freeze/refresh in there as well.
Create an account or sign in to comment