Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6891 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

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.

Posted

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

Posted

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.

This topic is 6891 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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