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

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

Recommended Posts

Posted

How do I incorporate a sort step in a script which will specify the sort by fields. I have three butons on the main layout. Each button sorts the same data in three different ways...

thanks

Posted

First set up your sort in the Sort dialog (under Tools)

Then create your script using the Sort script step (be sure to select the option to "Restore Sort Order")

The script will now remember the sort you set up a moment ago.

If you wanted to change that sort setup, go back to the Sort dialog, set it up how you like, go back into the script, then close the script. It will ask you if you want to keep the previous sort information or replace it with that currently in use.

Have fun!

Posted

The script will remember the sort order but.... If another user is accessing the DB and does not know the proper sort order... does each script remember a different sort order without having to change it in the dialog box every time? so that each button will sort according to its script step without dialog

Posted

yes, when you close the script dialog, it embeds the sort settings into the sort script step. You can have as many different sorts as you like, as long as they are in separate scripts.

Posted

A useful technique is to make a bunch of one-command sort scripts, named for what is being sorted, SortID, SortDate, SortCity, SortName, etc. Do the sort manually before creating each one, so it will remember that sort.

In all scripts that need to sort a certain way, add a Perform Script (subscript) step that runs that particular sort order. The same technique can be used for frequent Finds that need to run in scripts.

In general, you do a one-time setup of all needed Sorts and Finds, then use then as subscripts when needed.

Steve Brown

Posted

Great idea! You could use this for page setup/printing too (especially if you use laser printers, receipt printers, label printers, etc!)

This topic is 8037 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.