If you have a comment on this topic, contact Aptify Documentation. If you want to return to the Aptify Community Site, please click here.

Defining the Sort Order for Sub-Type Listings

In Aptify, records associated with sub-type entities can only be accessed through a Sub-Type tab from the current service (entity). This information is displayed using the Sub-Type Control as a list of records. By default, the records within the grid are sorted by the sub-type entity's Sequence field is ascending order. However, in some cases, sorting by sub-type sequence may not make appropriate. Therefore, Aptify allows an administrator to modify the sort order when applicable.

This behavior is controlled by the Order By field which is found on the Configuration > General tab of a Entities record that is a sub-type. By default, the Order By field sorts the records by the ID field linked to the parent record and the sub-type entity's Sequence field.

An administrator or developer can use the AllowSort input property to configure the sorting behavior within a sub-type grid. However, this only applies to the record that is currently opened. When the record is closed and re-opened or another record is opened in the same service, the order in which the sub-type records appear defaults to the value defined by the administrator or developer in the sub-type entity's Order By field. See Working with Form Tabs for more details.


The figure below depicts the default value of the Order By field for the PersonsCompanies sub-type entity (which displays the companies in which a person has a relationship on a Persons record's Details > Companies tab).

Example of Default Order By Syntax

An administrator can define an unlimited number of sort order levels for records within a sub-type grid by modifying the sort criteria within the Order By field using the following syntax:

First Level Field Name to Sort By DIRECTION(ASC|DESC), Second Level Field Name to Sort By DIRECTION(ASC|DESC),etc.

In the figure below, the Order By field has been modified to the first sort, in descending order, the records within the PersonsCompanies sub-type grid by the Title that describes the person's role at the specified company, and then in ascending order by the name of the associated Company.

Modified Sort Order for the PersonsCo mpanies Sub-Type Listing

Copyright © 2014-2019 Aptify - Confidential and Proprietary