• No results found

Sorting records

In document Chapter 1: FileMaker Pro basics (Page 179-182)

FileMaker Pro stores records in the order they were added to the file. However, you often want to work with records in sorted order. Sorting temporarily rearranges all or a group of records (the found set) based on the entries in a field or set of fields, so you can browse, update, or print the records in a different sequence.

You sort records by selecting fields whose contents you want to sort by. The first sort field arranges the records based on the field’s contents. The second sort field arranges records when two or more records have the same value in the first sort field, and so on. You can sort records in ascending order, descending order, or in a custom order based on a value list.

FileMaker Pro keeps the records in the sorted order until you perform a find or sort the records again.

1. To sort some but not all of the records, find the records to sort. See “Finding information” on page 4-19.

2. Choose Sort from the Mode menu.

To delete Do this

One record Select the record to delete and choose Delete Record from the Mode menu. In the alert message, click Delete.

A group of records Use Find or Omit Multiple to select a subset of records to delete, and then choose Delete All from the Mode menu. In the alert message, click Delete.

All records in a database Choose Find All from the Select menu, and then choose Delete All from the Mode menu. (Or create a clone of the database with no records. See “Saving a copy of a file” on page 1-11.)

Choose FileMaker Help Index from the Help menu, and then type:

E

records, overview

3. In the Sort Records dialog box, choose fields for sorting, in the order you want them sorted.

To Do this

Choose a sort field and sort it according to the selected order

In the fields list, double-click a field. Assign different sort orders to

fields as you add them to the Sort Order list

For each sort field, in the fields list, select a field, select a sort order, and then click Move.

Ascending order is first to last character in the alphabet for text, lowest to highest for numbers, and earliest to latest for dates and times. Descending order is last to first character in the alphabet for text, highest to lowest for numbers, and latest to earliest for dates and times. Change the sort order for fields

in the Sort Order list

For Sort Order, select a field, and then select a sort order.

Sort according to the order of values in a value list (for example, in the order months are arranged)

In the fields list, select a field, select Custom order based

on value list, and then choose or define a value list. (See

“Defining value lists” on page 3-74 and “Entering data from a value list” on page 4-9.)

Change the order of fields in the Sort Order list

For Sort Order, use the double-arrow (to the left of the

field name) to drag the field to a new position. Remove a field from the Sort

Order list

For Sort Order, double-click the field.

Remove all fields from the Sort Order list

Click Clear All.

Sort by summary fields Select Include summary fields. (See “Sorting by summary fields” on page 4-32.)

Use a language for the order in which fields are sorted that’s different from the one used for indexing

Select Override field’s language for sort, and then choose a language.

Close the Sort Records dialog box without sorting

4. Click Sort.

To cancel before sorting is finished, press Esc. Keep these points in mind:

1

To sort records that have container fields that you want in order, create a text or number field that describes or identifies the contents of the container field. Then sort by the text or number field.

1

To restore records to the order in which they were added to the file, choose Sort from the Mode menu, and then click Unsort in the Sort Records dialog box.

1

When you sort repeating fields, or related fields in portals, FileMaker Pro uses only the first value in the repeating or related fields to sort records. To sort records based on values other than the first value, make separate records for each repeating value.

1

You can specify a sort order for related fields. If the match field in one record in a file relates to the match field in more than one record in a related file, you can specify that the related field in the first file display a sorted value (or several sorted values if the related field is in a portal displaying more than one row). For more information, see “Sorting records with related fields” on page 10-35.

Select fields to sort

1

When you add a record to sorted records, FileMaker Pro tries to maintain the sort order. It adds new records to the end of the group the current record is in. For example, if you sort records by month and add a record where the month is June, FileMaker Pro adds the record to the end of the group of June records. The message in the status area changes to Semi-sorted to indicate the approximate order. When you finish adding records, resort them.

1

To create a script with a sort order, define the sort order, and then click Done. Then define the script.

In document Chapter 1: FileMaker Pro basics (Page 179-182)

Related documents