Version 2021

Sorting grouping fields

Grouping records helps people who read the document understand the data better. Grouping the data sets up a type of hierarchy within the document, and an inherent or implied sort order for the data in the document. The data is sorted first by the first field in the Grouping panel, then by the next field, and so on. To reorder the grouping, you can move the fields in the Grouping panel (as described in the procedure below).

You can select which grouping fields to sort, the sorting criteria (what to sort by), and the sorting order (ascending or descending). Any object in the Grouping panel can be sorted.

  • If the object is an attribute, an ascending sort orders the data from smallest to largest, such as A - Z, or 1-10. If you choose descending order then the data appears from largest to smallest, such as Z - A, or 10 - 1.

  • If the object is a consolidation, you cannot change the order. You can change the sorting criteria from top to bottom. Top means that the element name is displayed first, then the individual items. Bottom means that the individual items of an element are displayed first, followed by the element name. However, for these options to affect the document, the custom group must be displayed as "Show only the individual items within this element and also, expand these individual items if possible" or "Show element names, individual items within this element and also, expand these individual items if possible".

  • If the object is a custom group, an ascending sort displays the elements in the order in which they were defined. Descending order reverses that order.

Prerequisite

To specify whether a custom group is sorted first by the element or by the element's individual items, the custom group must be displayed as either of the following:

  • Show only the individual items within this element and also, expand these individual items if possible

  • Show element names, individual items within this element and also, expand these individual items if possible

For more information on these settings, see Custom Group Editor: Choose a display option dialog box.

To sort grouping fields

  1. Open a document in the Document Editor. How?

  2.  If the document contains multiple layouts, click the tab of the layout to modify.

  3. If a grouping has not been defined, define it. How?

  4. To change the relative order of the grouping fields, rearrange them in the Grouping panel. How?

  5. From the Data menu, select Sorting. The Sorting dialog box opens, with all grouping fields listed in the Grouping area (the top half of the dialog box).

  6. To change the Criteria (what to sort by) of a grouping field, click in the Criteria column of that grouping field. From the drop-down list that appears, select the criteria to sort by:

    • If the selected grouping field is an attribute, select which attribute form to sort on.

    • If the selected grouping field is a custom group, select from the following options:

      • Keep Group Structure, which indicates that the custom group is not sorted (the default)

      • Sort on Attribute ID

      • Inherit Attribute Sort, which uses the default sort of the attribute form set to display first.

      • If the selected grouping field is a consolidation, the only option is Default.

  7. In the Order column, select Ascending or Descending.

    You cannot change the Order if the Criteria of an attribute is set to Default. You can change the order of a custom group only if you selected Sort on Attribute ID in the Criteria.

  8. If you are sorting on a custom group, you can change the Parent Position, which is the position of the element headers relative to the child elements. Select from the following options:

    • Default inherits the sort property of the custom group

    • Top displays the element name first, then its individual items (that is, the header is displayed above the children)

    • Bottom displays the individual items of an element, followed by the element name (that is, the header is displayed below the children)

    The Parent Position options affect the document only if the custom group is displayed as "Show only the individual items within this element and also, expand these individual items if possible" or "Show element names, individual items within this element and also, expand these individual items if possible". For more information on these settings, see Custom Group Editor: Choose a display option dialog box.

  9. Change each grouping field as necessary. When you are done, click OK to return to the Document Editor.