Skip 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.

one-click multi-column sort script

Featured Replies

Hi there,

I've been looking at the posts regarding the multi-column sort scripts, and was wondering if that's what the sample databases use for sorting.

In filemaker pro 5.5, using the sample "purchase order" database, there is a list view in which you can sort by clicking the column headers. However, looking at the scripts and values, there is nothing similar to what has been suggested here (using getfield).

Anyone know how they work ??

Thanks !

The samples available with FileMaker Pro use the Table view layout.

These can have the column headers be clickable so that you can sort by clicking on any of the field names. Available from the setup for the layout, under the views tab, the table view has extra options.

This is different to the multi-column sort scripts.

HTH

  • Author

Are you sure it uses the table layout ??

I've tried it myself, and it gives a very different result. Using the table view allows the columns to be moved, and right clicking on the titles gives me some sorting options, but what they have is different. It says "View as list" in the view menu (changing it to table gives me...the table view), and there are a bunch of scripts used to sort. Clicking once on a column title sorts it using it, and clicking once more togles the sort to Ascending/Descending (same as the table view that you mentioned). I've played around with the scripts, and they are bizzare (unless I'm missing something). For example, deleting the sort[Restore, No dialog], saving, and puting it back after prevents the sort from happening again...go figure.

If it is using the table layout however, how did they change the layout so much ?

OK.

So the sample you have has preset sorts configured.

If you delete the sort [restore, no dialog] and save the script then yes the sort will not work, as you have taken out the saved sort.

To put it back you have to do a manual sort, then go into the script and when you save it you choose to replace the current saved sort. Then the sort order is back.

Check the scripts attached to the table headers. They will probably be setting a field and checking what that value is. Then, based on that value running the ascending or descending sorts.

  • Author

Ok...I think I'm starting to see what you mean by preset sorts.

So in their example, they made multiple scripts, and for each scirpt, manualy set a specific sort. Then by using their "sort" value, they know which script to run..?

In the script the sort variable is "HiliteSortedBy". From what I understood, it is used to choose the sript to run, and to display the little arrow next to the column header (it indicates either ascending or descending sort). What I didn't catch was how the sort new wich fields to sort, since it simply said "sort[restore, no dialog]". Does restore mean "put back the sort values that existed when the script was made" ?

If it is so, then why do some bother trying to make sort using getfield commands ?

I've attached the example so you can see what's going on...

Thanks a lot for your help & time.

  • Author

Ok, I finally got it !!

It is indeed what you mentioned, preset sorts. Didn't catch it at first, and now, the whole thing looks sooo simple !

Off to a slow start, but getting there !

Thanks a lot for your help. As mentioned in another thread...any good book you'd suggest that has good examples/descriptions ?

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.