Jump to content
Server Maintenance This Week. ×

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

Recommended Posts

Here's a way to have your portal sort (any column and any sort order) using only one field, one value list and a one liner script, that also take care of the graphical indicators.

-No Custom Functions used - FM7 version.

You'd use a second step with Refresh Window (Flush cache) for classic portals, but this still is a max of 2 lines of script necessary.

The tip can be easily used in any Table by just switching the value list attached to it, or may be used as a part of a dynamic portal where your users would simply choose the fields to place in the portal.

Don't feel like posting anymore until XMas, so Merry Christmas to all of you.

EasyPortalSortUS.zip

Link to comment
Share on other sites

  • 1 month later...

Ugo-

Very nice piece of work! cool.gif

Tell me, if the file authority was set as such - could I modify records in the portal rows? I assume it could be done that way, no?

I plan to use your code as a model to build a portal for an application - but one key aspect of it is I need the user to be able to choose where to move a given record within the sort.

Why you ask?

Because I need a data entry screen where a given user needs to able to choose the order they enter data into the rows - and there will be more than 50. They will rarely need to change the order - but must be able to set it up initially as it suits them. So my plan is to have the first field in the portal labeled "Sort Order" and then they would have to "manually" type into this field their desired order of the records in the portal. If they make a mistake and type the same number twice, etc - that would be their problem to correct.

Will this idea work?

Thanks in advance,

Mark L.

Link to comment
Share on other sites

Hi Mark,

If your intent is to dynamically manage the sort order of records in a portal, then yes it is possible and you don't actually need to do it the way I've build it.

Just set this number field from which the sort will be based and make sure through a loop in the related set that each record are given the *new* sort order when one is changed.

There's a file from Dj in this section designed with 6 that should just lead you there. If I recall, it was called "renumbering portal rows" by Djgogi. There may be some new functionalities with 7 but the solution shouldn't be that far from what Dj has built.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

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