Home > Articles > Data > FileMaker

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Sorting

When you’re working with multiple records, an obvious requirement is the capability to sort them so that they are arranged in a logical order.

FileMaker doesn’t store its records in a sorted order; it stores them in the order in which they were created. When you first open an unsorted table, the records follow that order. There aren’t any real mysteries here; for a view of the Sort Records dialog, see Figure 2.38. By default, the Sort Records dialog shows only those fields available on your current layout, but you can use the menu in the upper left of the dialog to choose from among all the fields in your database (including those related to the records in your found set).

Figure 2.38

Figure 2.38. You can control how a field is sorted: ascending by type (alpha or numeric generally), descending, or in custom order by value list.

To sort the records from a table in your database, move fields from the left side of the dialog into the right. There, you can choose to have a field sort ascending, descending, or based on the order in which values appear in a specific value list. Choosing Descending, for example, sorts a number field from largest to smallest.

If you move multiple fields into the dialog, FileMaker sorts all records by the first field. In cases where records contain the same values in the first field, FileMaker then uses the second field as an additional criterion.

By adding multiple fields to your sort criteria, you are specifying secondary sorts: First sort by last name and then by first name, for example.

Often, sorts are attached to buttons so that you don’t have to enter the sort specifiers each time. For example, in the Assets list view shown in Figure 2.39, you can sort assets by item, category, or status.

Figure 2.39

Figure 2.39. Attach sort scripts to interface elements.

  • ccc.jpg Sorting by summary field is a bit tricky. See “Using Summarized Reports,” p. 295.
  • + Share This
  • 🔖 Save To Your Account