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.

Retaining Sortorder after a find.

Featured Replies

When I do a find for particular records, I seem to lose the sorted state of my records. Is there a way, where I can retain the sorted order Date (desc) when I click on the find button in the status area?

Thanks

If this is part of a script, you could script step Sort (perform without dialog) and not specify the sort order. This should sort the records by however they were previously sorted before the find.

  • Author

Hi,

I use a script to enter find mode.

Once the database has gone into this mode, the onus is on the user to press the "find" button in the status area.

The system seems to lose the sort order, when it finds a new set of records.

You could script the entire find and use a global find field. Thus enter the text/number/date/etc into the global and then click the script button. The script should run something like this.

Freeze Window

Set Variable ($$find, Global field) (only use 1 $ if the find is within the same table)

Enter Find Mode

Set Field (field to be used in find), $$find

Perform find []

Sort (whatever the sort is you want)

Go to record/request/page [first]

Refresh window.

This should do it.

  • Author

Thanks flook,

This would work perfectly, if the script was definately based on a specific field. At present, my script just goes into "Enter Find Mode". The user then manually enters the fields he wants to search and then presses the "Find Button" in the status area. If a new foundset is created based on the new criteria, the system loses its sort order. Im trying to determine if there is a way I can run/continue a sort script when the user presses on the Findbutton in the Status area.

Cheers

This would work perfectly, if the script was definately based on a specific field. At present, my script just goes into "Enter Find Mode". The user then manually enters the fields he wants to search and then presses the "Find Button" in the status area. If a new foundset is created based on the new criteria, the system loses its sort order. Im trying to determine if there is a way I can run/continue a sort script when the user presses on the Findbutton in the Status area.

FileMaker does not automatically reorder the records after a Find to your previous Sort order. This will need to be scripted.

My recommendation is to have your script run like this:

Enter Find Mode [ Pause ]

Perform Find []

Sort [ Restore, No Dialog ]

With a standard sort order entered in the Sort dialog.

If the user may have sorted by a variety of things, and you wish to resort by their last sort, that's more complicated, requiring you to set a global (field or variable) with something to indicate the last sort order, so your Find script can re-run it.

  • Author

Thanks Ender, That is exactly what I was looking for!

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.