**Updated** FileMaker Button Bar Portal Sort Header

**This post is an updated version from the original post that can be found here.**

We are excited to announce an update to the Portal Sort Header demo and video that we had posted back in 2016. We have refactored the process a little. It now uses JSON for variable passing. This change has removed the need for any custom functions. We also updated the object names so they are easy to see in the left panel object viewer. 

What is it?

For  those of you not familiar with the previous portal sort headers, or if you don’t even know what sort headers are, you are in luck. We have created some easy to implement buttons in (button bars), that you can put above your portals (or rows in list views) to control sorting of the portal (or lists) by specific fields. It provides a nice user interface showing ascending, descending, and no sort states, as is commonly expected when sorting.

For the sorting, we use Kevin Frank’s technique as it is super fast and very efficient. Be sure to check out his three-part post about Portal Sorting. Part 1, Part 2, Part 3

In addition to refactoring the demos, we have also included two new videos to assist users.

Portal Sort Headers – How to Install

In this video we quickly walk through a basic installation process using our new demo file and a basic portal.

Portal Sort Headers – Under the Hood

In this video we look deeper into the mechanics of the Portal Sorting Header buttons. We look at each part to ensure you don’t get hung up when trying to implement or adjust them, and we also take a brief look at list sorting using the same buttons and script.

If you’d like help with this concept of portal sort headers, my next Office Hours will be Thursday, 3/3/22, from 1-2pm Pacific. Sign up and bring your thoughts and questions.

You can also send us a message below. 

3 thoughts on “**Updated** FileMaker Button Bar Portal Sort Header”

  1. Would also suggest changing the multiplier in the two sort field calculations from 100 to 1000 or even 10000 otherwise it won’t sort correctly if your number has more than 2 decimal places, i.e., change “100 * GetAsNumber” to “10000 * GetAsNumber”.

  2. This is great! Thank you for sharing. I had a few issues you may wish to address…

    1) For some reason FieldType ( Get ( FileName ) ; $$SORT.TOSORT ) does not work properly in the two sort fields … it appears the Get (Filename) is the culprit. (Using FMP 19.6.1.45 on MacOS). Changing this to FieldType ( “” ; $$SORT.TOSORT ) appears to have fixed the issue.

    2) There’s a typo in the Script Parameter calculation in Segment 1 of Button Bar 10… the Sort should be 2, not 1.

    Currently Reads:
    [ “Sort” ; 1 ; JSONString ]

    Should be:
    [ “Sort” ; 2 ; JSONString ]

Leave a Reply

Your email address will not be published. Required fields are marked *