Script Steps Reference
Table Of Contents
- Contents
- About script steps
- Script steps reference (alphabetical list)
- Control script steps
- Navigation script steps
- Editing script steps
- Fields script steps
- Set Field
- Set Field By Name
- Set Next Serial Value
- Insert Text
- Insert Calculated Result
- Insert From Index
- Insert From Last Visited
- Insert Current Date
- Insert Current Time
- Insert Current User Name
- Insert Picture
- Insert QuickTime
- Insert Object (Windows)
- Insert File
- Update Link (Windows)
- Replace Field Contents
- Relookup Field Contents
- Export Field Contents
- Records script steps
- Found Sets script steps
- Windows script steps
- Files script steps
- Accounts script steps
- Spelling script steps
- Open Menu Item script steps
- Miscellaneous script steps
Found Sets script steps
F
ILEMAKER SCRIPT STEPS REFERENCE 81
Sort Records
Purpose
Sorts the records in the current found set according to specified criteria.
Format
Sort Records [Restore; No dialog]
Options
• Perform without dialog prevents display of a dialog box when the script step executes that
lets the user enter a different set of sort instructions.
• Select Specify sort order or click Specify to create a sort order and store it with the script
step. When Specify sort order is not selected, FileMaker Pro uses the most recently
executed sort instructions.
Compatibility
This script step is also supported in web publishing and in a FileMaker Server scheduled script.
Description
Find the records you want to sort (using Perform Find script step or Show All Records script step)
before using this script step. If you sort a repeating field, FileMaker Pro sorts on only the first entry in
that field. You don't need to use the
Enter Browse Mode script step or Go to Record/Request/Page
script step after using Sort Records.
Each Sort Records script step can store a unique sort order; the sorting instructions are stored with
the step, not the script. You can use this step several times within the same script and store a
different sort order for each occurrence.
Note Items in the sort order that aren’t valid when the script step is performed are ignored. When
you specify a sort order in a database containing multiple tables, FileMaker Pro stores the table
name for each sort field in the sort order. For example, a sort order using the Last Name field of the
Contacts table is stored in the sort order as Contacts::Last Name. If the Sort Records script step is
performed when a table other than Contacts is the active table, Contacts::Last Name cannot be
evaluated, and is ignored in the sort order.
Examples
Go to Layout ["My sort layout"]
Show All Records
Sort Records [Restore; No dialog]
Print [ ]