Jump to content
Sign in to follow this  
Clif Graves

Odd FM7 Portal Sort behavior

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Are you committing the record after changing the global?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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