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.

Sorting empty fields last

Featured Replies

I want to do a sort ignoring empty fields;

ie I want to see all records where foodtype is starts with "A" for "apples" appear near the top;

I want to see all records where foodtype is "Z" for"zucchinis" appear near the bottom,

ie I want to see all records where foodtype is empty appear at the very bottom.

I have no control over what users place as field values. I have tried custom value lists mentioning "=" amd "*" sort values, but nothing works.

Steve

  • Author

Thanks, Queue

I read the Cafe posts.

But unfortunately, I still have a few problems with the proposed solutions:

1)I cannot foresee what values will be in the field to be sorted;

2) I do not know how to specify "Blanks" in a "define value lists" dialogue (see above) which is what the response seems to suggest), and

3) I actually have 4 sort criteria, not 1. (I had simplified the issue for clarity).

Add a calculated field equal to your fieldstuffs field but concatenating "zzzz" to it (as proposed on one of the Cafe posts). Then display your records sorted by that field.

The idea is to make a value list based on that field. You don't need to know what values will be in it. Just make a value list based on Table::foodtype. Then define the first field in your sort order to be Table::foodtype with a custom order based on the newly created value list. Your remaining sort fields will follow beneath it.

  • Author

Again, how do the blank fields get sorted to the bottom?

(I like the simple concatenated soluion, but I still find it hard to believe I haven't missed some simple sort option in Filemaker 4.0!)

Steve

* * * * * * * * * *

>The idea is to make a value list based on that field. You don't need to know what values will be in it. Just make a value list based on Table::foodtype. Then define the first field in your sort order to be Table::foodtype with a custom order based on the newly created value list. Your remaining sort fields will follow beneath it.

They just do. wink.gif Since they are not contained in the value list, they are sort of like leftovers that hang out at the bottom once the other records have been sorted.

I just noticed you are using 4. I know this works for 5 and up. I would assume it should also hold true for 4. I can make a sample fp5 or fp7 file for you, if you would like.

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.