Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6086 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

New Member. Have been using Filemaker for ages and now am starting to get a bit more advanced.

I have been developing a database and it is a main file that allows the creation of portals rows in a related table.

Each record in the reference table auto enters a incremental number. The portal is then sorted by this number. I am trying to find a way of changing the sort order i.e. moving records up and down in the portal by swapping the previous records unique number with the one after or before thereby swapping the order up or down.

Have tried and tried and not got anywhere and am now asking for help.

thanks

Duncan

Posted

Don't mess with the key fields (the unique ID of the record in the portal). Rather, create a field "SortOrder" and use that. Allow the user access to it. Set the portal sort to use that field.

  • Newbies
Posted

Thanks for the advice however there must be a way of moving a record up or down inside a portal. I am happy to keep the unique ID for the record and create another. My problem is a script that swapps the value in record one for the value in record two and by doing so reorders inside the portal.

Posted

You cannot drag and drop if that's what you are referring to. You may wish to check out Matt Petrowsky's site, as he has many technique files regarding portals. Click the link at the top of this page for FileMakerMagazine.com

Posted

It's possible, just a little tricky. You need to do this in the child table, so that you can get back to the record being moved without losing your place on account of portal resorting.

Start with Go To Related Record [show related records only] and store the child record's rank into a variable. Then go to the next/previous record and swap the ranks. Return to the original record and replace the rank.

That's only a rough outline - you need to watch out for some gotchas, like trying to move the first portal row up.

This topic is 6086 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.