Sorting of structure groups (StructureGroup.DisplayOrder)

since PIM 7.1.01

How are structure groups sorted?

In the tree of the Primary (/Secondary) Structure View, structure groups are shown in a sorted way, using the following criterias (in the specified order):

  • StructureGroup.DisplayOrder (=Sequence)

  • StructureGroup.StructureGroupIdentifier.HierarchicalNumber (=Hierarchical Number)

  • StructureGroup.StructureGroupLang(structureLanguage).name (=Name)

  • StructureGroup.Id

What is a display order and what is it used for?

A display order is an integer value stored in the field StructureGroupType.DisplayOrder. It is used to determine in which order structure groups and child structure groups should be displayed in the structure tree views for example (see above).

When are display orders changed?

There are three situations in which a new display order has to be determined.

  • a new structure group is created

  • a structure group is moved

  • a structure group is copied

    • within one structure

    • into another structure

Default display order

The default display order is Integer.MAX_VALUE = 2147483647.

How are display orders generated?

  • New structure groups are always created with the default display order, independent of through which action they are created.

  • When moving or copying a structure group into a structure group (as child) in the same structure without concrete position (this is done by drag'n'dropping it directly on to a structure group in the "Structure View" tree), it always gets the default display order.

  • When moving or copying a structure group to another structure, it always gets the default display order. Copied child structure groups keep their display order.

  • if a whole structure is copied, all structure groups keep their display order

  • When moving or copying a structure group to a concrete position (between two other structure groups, before or after a structure group), it gets a concrete display order, which is calculated with help of the surrounding structure groups.

    • If in this case, no space is left between the surrounding structure groups (concerning the display order), the display orders of all child structure groups of the parent structure group are redefined. Therefor the sort order criterias mentioned above are used.