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.

Excel-style sorting

Featured Replies

I have a table that I'd like to be able to sort according to columns similar to the behavior in MS Excel.  I'm wondering if someone already has an example of this that they could share, or suggestions on how to go about it.

 

In other words, sorting columns sequentially would not clear the prior sort order, but would apply the prior order as a secondary sort criteria.   Also, sorting by the same column twice should reverse the primary sort order.   This would be done with sort buttons in the column headers, without bringing up the sort dialog. 

 

Thanks. 

Hi Matt,

 

Unfortunately there isn't an elegant way to programmatically, change the sort order without hard coding all the possible permutations of the given columns.

 

Given that fact i have done it with a VirtualList so that I can control the fieldNames used for the columns and there was a finite number of columns but it ads overhead

and the data being sorted is at least one relationship away, adding a performance hit.

 

However there is one clever trick using a Web Viewer with JQuery and SQL functions to display the results in columns & rows allowing for user interaction to inverse sort on columns - i am sure some programing you could allow the clicks to the column headers to append the sort order as it does in Excel.

 

http://www.seedcode.com/filemaker-sql-explorer/

  • Author

 

 

there isn't an elegant way to programmatically, change the sort order without hard coding all the possible permutations of the given columns

Eeek.  That's what I would hope to avoid. 

 

Thanks for the tip on SQL explorer.  I've shied away from learning SQL, but this might make things less painful.  

  • Author

Thanks LaRetta, that's brilliant. 

I do feel the need to caution a bit ... these techniques, from my understanding and I could be wrong, are unstored.  Jeremy's process will be a life-saver when you really need to multiple-sort but keep it in reins.

 

I have not speed-tested any of these various options across WAN.  I would probably consider using Perform Script On Server to find and then sort and just give me a list of sorted record IDs (no not unique IDs but record Ids; they are much faster) and use them in virtual portal in their already-sorted state.  But so far I've dodged the multiple-sort-bullet by other tricks, smoke and mirrors, and a LOT of luck.

  • Author

Well, it is certainly a clever solution nonetheless.  I was able to come up with my own ad hoc method with a script, and it suffers from the same limitation.  Namely, sub-summaries parts do not display when sorted by the corresponding column header.   :hmm:

  • Author

Wow.  I'm embarrassed to admit that I did not know that one can sort by two fields at once in Table view by Command-clicking multiple column headers.  It ain't perfect, but its still good to know about. 

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.