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.

Odd FM7 Portal Sort behavior

Featured Replies

The deal is this, I use a filtered sorted portal on the left side of my layouts for a menu. What shows in the portal depends on a match between the "menuName" and "gMenuName" a global. The portal sorts on "MemuSort" a numeric based with numbers for sort position. Always worked in FM5-6 but in FM7 with the sort is set to "MenuSort" it does not.

In fact if you open the portal properties and "reset the sort" it will sort but only stay sorted until you leave the layout, but upon return it is again unsorted. Is this just a bug in FM7 portal sort or am I missing something?

I assume your menu is based on records in it's own table? Are you creating a seperate TO for each TOG? If you don't, I don't see this as something that should be a direct cause, but I've seen other similiar problems. Also, be sure you are running 7.0v3

I'm having a similar problem where I want to sort a portal by a particular global field. I then use a script to change the value of the global field to the regular field names so the portal can sort by the regular fields.

This way the user can click a button and change the sort field in the portal.

However, it seems broken in Developer 7 Mac OS x. It was working in version 6 of Developer .

Any ideas?

Cheers

Darrel

Are you committing the record after changing the global?

  • Author

Ok I think I have it, though the why has me a bit baffed.

There are two places where portal sorts can happen in a FM7 portal at the portal dialog and at the relationship.

I started with the relationship UNsorted and tried to sort at the portal. This failed (well it sometimes worked for a while then failed..) but if I do the sort at the relationship, it sorts correctly. Brings up the question of what the sort at the portal is supposed to do vs. at the relationship.

confused.gif

Well, a portal sort should merely override the relationship's defined sort. Perhaps there is a portal bug if the relationship has no sort defined and a portal does.

  • Author

That seems to be it. IF the relationship is sorted THEN the portal sort can force a sort in the other direction etc reliably. But if there is NO sort at the relationship, it does not seem to be able to stay sorted from just the portal sort.

  • Newbies

I believe I had the same problem with sorting portals. In FM5, it was not a problem but in FM7 the portal would not properly sort. My portal had several fields in each portal row and I wanted to be able to sort the portal by different columns (i.e. a different field) using scripts to change the sort order of the portal data. The sort script I wrote changed a global field in the related table (the table with the portal's data) which was used in unstored calculations. After the calculations the portal would resort itself in FM5 but not in FM7. I found a workaround by inserting a "useless" step in the scrip--- set field [field1::portal table; field1::portal table]. I assume that this step somehow allows all the calculations in the portal's table to update.

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.