Fastest Related Record Duplications
While Claris/FileMaker offers a convenient Duplicate Record menu option, of which there's always a companion script step for most menus, there's more to the equation than simply duplicating your primary record. In fact, in most situations, it is necessary to duplicate both parent and related child records. You will likely need to duplicate a complete set of records to address the entire entity. For example, think of the relationship between Order, Line Items, Ship Address, and so on, in order for a customer to place a duplicate order.
To accomplish this, there are various native methods available, often involving multiple GTRR (Go to Related Record) steps. Additionally, within your script, you will need to carry a newly created primary key to all the newly created child records. Therefore, the question arises: "What happens when you need to duplicate a large number of record sets?" This was the question posed by Daniel Wood, who proceeded to test and document the methods and their benchmarked results in an article published on their blog at the FileMaker consultancy Digital Fusion.
When confronting this same question, there is a method that I personally favor and know to be quite fast, and I was eager to see how it would perform. I integrated this method into Daniel's file and discovered that by utilizing a plug-in, a significant speedup can be achieved. This article focuses on the fundamentals of how this technique works and provides guidance on its implementation in your own solutions. I'd like to express my gratitude to Daniel for his hard work and for granting permission to distribute a modified version of his file.
- Read more about Fastest Related Record Duplications
- Log in or register to post comments
Server Side Related Record Duplication
Knowing how to take advantage of Server Side scripting within FileMaker is quite critical when you want the best performance possible. Of course, it makes total sense that you'll get the best speeds when working with the data where it's most accessible.
The trick with creating scripts which will also work on the server side is being very specific with the context of things. There's also the very important choices of which method you're going to use. In 2018 I covered a method using a dedicated table occurence which is perfectly viable today. However, I didn't show the other methods possible and we also got some newer features which allow us to do things even more differently.
This video shows you how to write a script which will duplicate related record sets and do so using the method of exporting and importing. I also cover a method which uses JSON in order to replicate a set of related records. This code can be used in many more places than just duplicating related record sets. I hope the content helps you advance your level of FileMaker development knowledge.
- Read more about Server Side Related Record Duplication
- Log in or register to post comments
Duplicating Related Records - Server Side
The age old question commonly arises on FileMaker forums around the world. "How can I duplicate the whole record?" In other words, how can I duplicate the parent record and all related children records which make it seem like it's one whole entity.
Well, at least, that's how a newer user/developer sees it. They may visually see the one record with all of its related records presented within the portal, but making the distinction that you're actually looking at 1 record plus N related records isn't super obvious from a UI standpoint.
However, as a FileMaker developer, you need to know how to duplicate the whole collection of records so the user can conveniently click that one single button which reads "Duplicate". There are many methods you can use to accomplish this task, but there are a few tricks to making to work successfully and reliably depending on your specific requirements.
In this video I present one of the most efficient methods for duplicating whole related record sets. No matter how many sets of related records you have, you can always take advantage of the inside knowledge on how to accomplish this type of task in FileMaker Pro.
- Read more about Duplicating Related Records - Server Side
- 4 comments
- Log in or register to post comments
Duplicating Related Record Sets
FileMaker provides us with the wonderfully simple Duplicate menu option right there within its Records menu. The problem, however, with a relational database, is the fact that many times you're in need of duplicates of both a master record and any of its child records.
This video presents one of the many possible solutions to this exact issue.
You can, for example, export a set of related records and then reimport them while reassigning key fields. You can also fully script the whole process using all of the original data and simply assign new key values as you walk across a portal.
In this video, I walk through one of my favorite methods for creating related records - the Obligatory Create method. This method has a number of advantages and adds only a few extra table occurrences.
As with any technique for solving a specific problem, you must assess if the solution fits your environment and the given circumstances. Doing this comes with experience and exposure to the various possible methods. This method is just one of many.
- Read more about Duplicating Related Record Sets
- 7 comments
- Log in or register to post comments