Attractive Sorting Indicators

Isn't is great when you know what the status is? I'm sure you appreciate walking into a mall and knowing whether a store is opened or closed based on that sign in the front door - you know, the classic open/closed sign they just flip around.

It certainly prevents you from having to walk over to the store and rapping on the door to see if someone is there - in other words, expend the extra effort to find out what the status is. The same thing applies to your user interface. Giving a visual indicator of status is a great feedback tool when a user is using your solution.

In this video, I walk through the use of a single script which is attached to a very attractive sort indicator. Adding this feature to your database gives your user a nice indication of the sorted state of your list views. It uses conditional formatting to accomplish the sort indicator so there's no extra fields, relationships or table occurrences to deal with.

It's portable, and can be added or extended within a few seconds to account for as many different fields as you desire. Watch the video and dissect the technique file for a better understanding!

AttachmentSize
AttractiveSortingIndicators.zip243.37 KB

Comments

Love the article. I will use this script from now on when I can. Instead of the chart button I will just use the up and down triangle (font character) to display the direction. Like in iTunes. I have each triangle in their own separate text box. Tahoma 11 font. Then if say the column heading isn't in the $$ I make it 400 pt. If it is in the $$ and is True then I make it white font, if False then 400 pt. Then I do the opposite on the other triangle and overlay them on top of each other. I put the button on the column heading.

In fact, I would take that one step further and simply put the triangles within a custom function. (since it's so easy to copy/paste custom functions now).

You can also get away with a repeating calculation and use each repeat for the various columns. This will save you from having to add a new field for each corresponding sort indicator.

Of course, if you know you're standardized on FMP 11v2 then I would just go with using a merge variable right on the layout. This avoids all fields and becomes just the script and global variables - now that's nice!

-- Matt Petrowsky - ISO FileMaker Magazine Editor

As I'm trying to add this into a multiple table file with corresponding lists, I find that I have to have a script for each table and there is a bit of work in modifying the script paramater and the conditional formatting to recognise the table context.

Great technique! Is there any reason that you have to use text labels vs. buttons? I find that using button objects without the label works well for all the elements. Then you don't need to adjust the text conditional formatting. Just set the fontsize to 1 px on each element.

Instead of having a sort indicator for each field--which could be tricky to insert if you have many fields to sort in the layout--why not have one sort indicator with the sorted field name to its right, and use the field labels as buttons/triggers to set the field name within the script?

For example: [.iI] = Sort Indicator (ascending)

---------------------------------------------------------

[.iI] Last Name

First Name..........Last Name..........SSN..........Birthdate......Student Number......Gender..........Race
--------------------------------------------------------------------------------------------------------------------------

The advantage of having the sort indicator in one place is that users wouldn't have to scan a row of field names to determine which one has the ascending/descending sort order; they'd only need to look in one place.

Hi,

Great solution that I've used in combination with the 'wf7a' to show a sort indicator as I didn;t have sufficient room in my list layout to have an indicator at the side of each column heading.

Thanks so much.

Simon