![filemaker pro 15 create new record in portal filemaker pro 15 create new record in portal](https://i2.wp.com/mazterize.net/wp-content/uploads/2019/12/RazorSQL.jpg)
This handy script step is aptly named as it removes the current record from your found set. The simple way to do this is to use the `Omit Record` step. So let’s get those pesky records out of our list. Well, we don’t want to duplicate that record, we just created it! In truth we really don’t want to duplicate previous record either because we just duplicated that one. Once your create script executes, there will be a new record at the bottom of the found set and you will be sitting right on it. Now we have a loop and need to duplicate some records, so throw that Create script you wrote above in next and *don’t forget* to specify the unique id of the record in the script parameter. The steps between those two will get repeated until you tell FileMaker to cut it out... but we’ll get to that part later. FileMaker will graciously throw an `End Loop` in there for you for good measure. So we’re on the last record now we are going to loop our way back to the top so add your `Loop` step. >Hint: If you have a particular order you want your records to appear in, sort your records so that the last one is the one you would like to be first in your newly created records This seems counter intuitive but since the new record step will put you at the bottom of the list we might as well start there and work up instead. The first step in script is `Go To Record/Request`. There are many ways to do it, this is just one of my favorites.
![filemaker pro 15 create new record in portal filemaker pro 15 create new record in portal](https://i.ebayimg.com/images/g/6YMAAOSwOvZc3Z9K/s-l300.jpg)
To combat this petulant behavior you have to arrange your looping script properly. The trick with this loop is that when you create a new record it gets added to the end of your found set of records and makes you lose your place in the list. Your looping script makes sure that you don’t mistakenly duplicate records multiple times nor end up in a never ending loop. After all it’s really just copying over a bunch of data. The create script does all the easy stuff. >Double Note: So you hit the wall and would just like a quick and dirty duplicate, then just use the Duplicate Record/Request step here instead of the create script. >Note: Normally my create scripts include a Go To Layout at the top of the script and a Go To Layout at the bottom of the script to make sure I have the correct layout context. When you have a table with 50+ fields the odds are there is a lot of data in those fields that you don’t want, so why bother keeping it? This is that control I was talking about This wasn’t a mistake it’s just that I don’t need the data in that field. I’ve left out the `STUFF_I_DONT_WANT` field. Notice my script doesn’t include all the fields in my table shown in the image above. Finally, pull over all the data you would like to collect from the original record and set it in the corresponding fields in the new record. Just grab that Script Parameter using the `Get( ScriptParameter )` function and set it into the field we created in step 1. It will require that a script parameter that is the unique `ID` of the record you are trying to duplicate. Once we set the ID of a record in our `ORIGINAL_RECORD_ID` field we will be able to use this relationship to pull the data we want into our new record. It should look something like this when you are done: You’re going to need a new table occurrence as well, in my case I named it `Original Record`. Use the unique id of your table and the field you just created as your keys in this new relationship.
![filemaker pro 15 create new record in portal filemaker pro 15 create new record in portal](https://i.ytimg.com/vi/uyT05j9j5D0/maxresdefault.jpg)
Now that we have our field created we need to create a relationship between our duplicate record and the original. Name it something simple like `ORIGINAL_RECORD_ID`. Create this field in the table where you want to create your duplicate records. We are going to need a field so this whole dealio will work. It may seem like a lot of overhead but I think it gives you a lot more control over the process. I suggest rather then using the `Duplicate Records/Requests` step, use a script, a field and a special relationship. Whenever someone asks me the question *How can I use `Duplicate Records/Requests` to duplicate a found set?*, I typically respond with… **You Don’t.** Seriously, don’t do it unless you are up against a wall and the burninator is coming. We hear he was planning an entire line of exclamation points, and a few OMG!!!’s in his next post. In this instance, they were left in place so that we could publicly ridicule Jesse. Here is how I would approach the task.Įditor’s Note: The use of quadruple question marks is a clear violation of Six Fried Rice editorial guidelines. but a found set? That takes a little bit of thought. Duplicating in a Record in FileMaker is very easy….