Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with swpping data

Featured Replies

  • 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

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.

  • 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.

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

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.