May 21, 200817 yr Newbies 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
May 21, 200817 yr 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.
May 22, 200817 yr Author Newbies 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.
May 22, 200817 yr 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
May 22, 200817 yr 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.
Create an account or sign in to comment