The Most Purchased FileMaker Videos Moving Records in FileMaker

FileMaker Coaches' Corner - Tip 5 – Portal Record Moving

My name is Christian Olsen and I'm one
of the FileMaker coaches here at Richard Carlton Consulting. For this coaches
corner I'm going to demo a technique that I use to move items in a portal. I'll briefly be touching on a couple of topics including portal sorts and script
parameters. For context my customer’s solution required attaching multiple salespeople to invoices in order of who was the primary or secondary salesperson. To resolve this issue we added a portal sort using scripts.
more info
First I'm going to demonstrate this as a finished product. So if we've had an invoice here and we attached a couple salespeople to it I would get the
ability here. As you notice it with John, Myles and Jason. And if Jason ended up being the primary salesperson I could move him up the portal as such. First, in order to do this you're going to turn on FileMaker’s built-in portal sort which I will show to you right now. You go into Layout Mode and double click on any portal and FileMaker you're gonna get your portal setup options. And if you go to specify Sort you can decide what to sort that portal by.
more info
The second thing that you're gonna need to do is attach the pieces of this portal to a single
Script. Now this could be done with several scripts. I opted to leverage FileMaker’s powerful calculation engine to have it done in one script using script
Parameters. So on our field here I right-click on it and I go to set script triggers. You'll notice that I have it calling a script with a parameter. Similarly each of our buttons here do the same thing, calling the same script but with a different parameter. What this does is when it calls this script we have a section that checks to make sure that two people are not selected at the same time. We have a selection on deleting a portal row but we've the heart and guts down here.

Our first step here actually sets the portal sort
number which I'll show you next and right down here allows you to change the sort number. Now the trick here is that you aren't just changing the sort
number of the one that you're affecting but you are also affecting the one that is directly above it or directly below it. As such I'm going to add someone on here so we have McKenzie at number one, we have David at number two and we have Oscar at number three. As I move Oscar from the 3 to 2 position I need to also move David from 2 to 3 position Richard Carlton FileMaker Experts and you'll see that happening on screen here. Conversely when we delete something we need to make sure that we adjust and re-serialize all those numbers.
That will conclude the Coaches Corner.

If you have any questions or interested in the coaching program please send an email to

If you want to learn more about portals and
scripts check out our training video courses at

And make sure you grab a copy of our free fully unlocked solution FM Starting Point atFM

Leave a Reply

Your email address will not be published. Required fields are marked *