More information

Profiles World

Site Specific Notes

Create and Maintain Data Display Sorts

Sorting allows users to customize the order in which the rows from a table display in the Profiles World so that the information that is most important to each user is the information most readily seen in the display. Each user can define his or her own Sort order for each of the data tables, and some of the linked, secondary tables that display with the data tables.

Sorting determines the order in which the individual data table rows appear on the display page. Since there are many variables that affect your display of data, for clarification, we list the things that Sorting does not do.

Sorting Features

Sorting does not apply to those data tables where each constituent can own only one row. These tables are Basic Data, Death, and Tracking.

A Sort definition is based on a set of fields that the user specifies.

You might choose to view the Address rows sorted by the Locator field. If so, all those with a Locator of Good would be grouped together and displayed first, followed by Lost, followed by Returned. Another user might prefer to sort them based on the date of the last update to the row,with the most recently edited address row shown first, regardless of any Locator information (or any other information) contained in the row.

Any field, even non-displaying ones, may be used as the basis for a Sort definition. When a field is specified, the rows will be sorted and displayed in ASCII order, based on the data that is contained in that field in each row. If the field is driven by a lookup table, the Sort will based on the Code for the lookup table entry, not the Value. The Sort may be in either ascending or descending order as you choose. Also, the Sort definition may be constructed using multiple "tiers" of up to five columns.

Example: An Address Sort definition could begin with the Locator field, followed by the Last Edit Date. In this case, all addresses with a locator of Good would be grouped together, and within this group of Good addresses, the address rows would be shown in order based on the Last Edit Date. Then all addresses with a locator of Lost would be grouped together, and within this group the address rows would be shown in order based on the Last Edit Date, and so forth.

System (Administrator) Sorts

Example: The system administrator can define a Sort for the Address table; the name of this sort is 'Profile Default'. The system administrator can also define a Sort for the Education table; the name of this sort is also 'Profile Default', and so on.

User Sorts

Sorting and Linked Records

Linked data rows will display with the primary data row to which they are linked if the Display mode is set to Long or if the Display mode is set to Short and the User Option to Display Linked Data in Short Display is checked. In many cases, a Sort can be defined and used on these linked data rows when they display with their primary data row. This Sort is independent of any Sorts that are defined and used when rows from the same data table (as the linked data rows) are viewed from a constituent's display of that data table. This Sort is also independent of any Sorts that can defined and used when rows from the same data table (as the linked data rows) are linked to a primary data row from a different table.

Millennium allows for Sorting on linked records for the following linked data rows/primary data row combinations:

Linked Secondary Row

Primary Row

Attribute

Basic Data

Attribute

Donor Tracking

Attribute

Education

Attribute

Employment

Relation

Donor Tracking

Relation

Planned Giving

Relation

Proposals

Actions

Planned Giving

Actions

Proposals

Actions

Tasks

Tasks

Actions

Examples:

- Suppose a constituent has Attribute rows that are linked to her Basic Data row, Attribute rows that are linked to her Education row, and Attribute rows that are not linked. A Sort is defined and applied to the Attribute rows that link to and are displayed with her Basic Data row. The same Sort cannot be applied to the Attribute rows that are linked to and display with her Education row, or to the Attribute rows that are not linked. It also cannot be applied to the rows in her Attribute Data Display, even if that display includes her linked Attribute rows. Conversely, a Sort that is defined and applied to the rows in her Attribute Data Display will not be applied when her linked Attributes are displayed with her Basic Data row or when her linked Attributes are displayed with her Education row.

- Suppose you want to sort the display of all Attribute data by Attribute Type, whether the Attributes are linked to another row or not. In the case of the example above, you must create and apply three different Sort definitions. One definition is created for and applied to Attributes that link to and display with Basic Data rows. The second is created for and applied to Attributes that link to and display with Education rows. The third is created for and applied to all Attributes when they are displayed with the Attribute Data display. All three of the Sort Definitions will use the Attribute Type field, and all three can have the same name.

The Define Sort Tool

The tool that is used to define the Sort displays two field lists. The first is called the Available Columns list, and shows the names of all fields in the table that have not already been added to the sort. The second is called the Selected Columns list, and shows the names of those fields which have been included in the current sort, with a leading '+' or '-' character to indicate whether the field is sorted in ascending or descending order. Both lists display both the system name and the label (alias) for each field; the Available Columns list displays the fields in alphabetical order by system name, while the Selected Columns list displays them in the order in which they were added to the sort.

The set of fields used to populate these lists is retrieved from the fieldlst system table. By default, the sort tool shows only the fields that appear in the Long View for the table; however, it can be configured to show all fields including system (non-displayed) fields. To do this, click the "All values" radio button above the Available Columns list.

Note: For some less-frequently-used applications of the Sort tool, the radio button described above is not available. In these cases, a representation of an input form for the table appears below the main tool; you can then click the button next to any field name to move the corresponding field to the top of the Available Columns list.

There are eight buttons on the Define Sort tool display:

Add Asc: Moves the selected field from the Available Columns list to the Selected Columns list, and tells Millennium to sort the data in this field in ascending ASCII order. Columns can be added to the Selected Columns list and sorted in ascending order by highlighting the name of the field you want to add and then clicking Add Asc. The fields added are always added to the bottom of the Selected Columns list. As previously mentioned, the field name in this list will be prefaced with a '+' character to indicate that the field is sorted in ascending order.

Add Des: Moves the selected field from the Available Columns list to the Selected Columns list, and tells Millennium to sort the data in this field in descending ASCII order. Columns can be added to the Selected Columns list and sorted in descending order by highlighting the name of the field you want to add and then clicking Add Des. The fields added are always added to the bottom of the Selected Columns list. As previously mentioned, the field name in this list will be prefaced with a '-' character to indicate that the field is sorted in descending order.

Move Up: Moves the selected item in the Selected Columns list up one row. This button is used to rearrange the order of the fields used in the Sort definition.

Move Down: Moves the selected item in the Selected Columns list down one row. This button is used to rearrange the order of the fields used in the Sort definition.

Remove: Removes the selected item from the Selected Columns list and places it back in the Available Columns list. Columns can be removed by highlighting the field you want to remove and then clicking the Remove button. Fields that are removed from the Selected Columns list are added back to the Available Columns list in alphabetical order.

Save: Saves the Sort Definition to the sorts system table, and to the user cache.

Delete: Deletes the Sort Definition from the sorts system table. You will be asked to confirm the delete.

Cancel: Returns you to the data display and does not save any of the Sort Definition changes that were made.

Creating or Updating a System Sort Definition

  1. Log on to the system as an Millennium or database system administrator.
  2. Locate any constituent and access the display of the table for which you will create the System Sort definition. It is not necessary for the constituent to have any data in that table.
  3. Point to either the section header Edit button edit button, or the Edit button edit button located to the left of an existing table row.
  4. Point to Options. Click Define Sort. The Define Sort tool displays.
  5. Use the Define Sort controls to add, remove, and order up to five data fields for the System Sort definition.
  6. Click Save to save the definition to the sorts system table. You will not be prompted to name the Sort because you can only have one System Sort per data table.

    Or

    Click Cancel to discard your changes.

Create or Update a System Sort Definition on Linked Data Rows

  1. Log on to the system as an Millennium or database system administrator.
  2. Locate a constituent and access the display of the primary table - the table to which the rows are linked. The constituent must have data in that data table and at least one row must have linked data rows. For example, to sort Attribute rows that link to Education rows, access the Education Data Display for a constituent who owns Attribute rows that link to Education rows.
  3. Point to either the linked data section header Edit button edit button or the Edit button edit button located to the left of one of the linked data rows.
  4. Point to Options. Click Define Sort. The Define Sort tool displays.
  5. Use the Define Sort controls to add, remove, and order up to five data fields for the System Sort definition.
  6. Click Save to save the definition to the sorts system table. You will not be prompted to name the Sort because you can only have one System Sort on these linked data rows.

    Or

    Click Cancel to discard your changes.

Delete a System Sort Definition

Delete will remove the System Sort definition completely from Millennium. If the intention is to view the data without a Sort applied, use the Sort Off menu item instead. See Using a Sort Definition, below.

  1. Log on to the system as an Millennium or database system administrator.
  2. Locate any constituent and access the display of the table whose System Sort you want to delete. It is not necessary for the constituent to have any data in that table.
  3. Point to either the section header Edit button edit button, or the Edit button edit button located to the left of an existing table row.
  4. Point to Options. Click Define Sort. The Define Sort tool displays.
  5. Click Delete. Click Yes to confirm the Delete, or click No to return to Define Sort.

Delete a System Sort Definition on Linked Data Rows

  1. Log on to the system as an Millennium or database system administrator.
  2. Locate a constituent and access the display of the table to which the rows are linked. The constituent must have data in that data table and at least one row must have linked data rows.
  3. Point to either the linked data section header Edit button edit button, or the Edit button edit button located to the left of one of the linked data rows.
  4. Point to Options. Click Define Sort. The Define Sort tool displays.
  5. Click Delete. Click Yes to confirm the Delete, or click No to return to Define Sort.

Create or Update a User Sort Definition

  1. Log onto Millennium with your User ID and password.
  2. Locate any constituent and access the display of the table for which you will create the Sort definition. It is not necessary for the constituent to have any data in that table.
  3. Point to either the section header Edit button edit button, or the Edit button edit button located to the left of an existing table row.
  4. Point to Options. Click Define Sort.
  5. The Open Sortcontrol displays, listing all of the Sort definitions that have been previously defined for your User id as well as the (New Sort) item.If the system administrator has defined a System Sort for the data table, the Profile Default item will be listed as well.
  6. Click (New Sort) to create a new Sort definition from scratch, and click OK. The Define Sort tool displays.

    Or

    Click Profile Default to create a new Sort definition that will use the System Sort as a basis, and click OK. The Define Sort tool displays.

    Or

  7. Click the name of an existing Sort definition to use it as a basis for a new Sort, or to edit it, and click OK. The Define Sort tool displays.
  8. Use the Define Sort controls to add, remove and order the data fields (up to five), that will be used for this Sort definition.
  9. Click Save. The Save Sort control displays.

    If you have created a new Sort definition from 'scratch', enter the name (no more than 30 characters) that you want to assign to it and click OK.

    If you have edited an existing Sort definition, click OK to apply the changes to the existing definition.

    If you have created a new Sort definition that used the System Sort or an existing Sort as its basis, enter a new name for it an click OK. This will create a new Sort definition, and leave unchanged the Sort definition that you began with.

    Or

    Click Cancel to return to return to the Define Sort tool.

Create or Update a User Sort Definition on Linked Data Rows

  1. Log on to the system with your User ID and password.
  2. Locate a constituent and access the display of the primary table - the table to which the rows are linked. The constituent must have data in that data table and at least one row must have linked data rows. For example, to sort Attribute rows that link to Education rows, access the Education Data Display for a constituent who owns Education rows and Attribute rows that link to Education rows.
  3. Point to either the linked data section header Edit button edit button, or the Edit button edit button located to the left of one of the linked data rows.
  4. Point to Options. Click Define Sort.
  5. The Open Sort control displays, listing all of the Sort definitions that have been previously defined for your User id as well as the (New Sort) item. If the system administrator has defined a System Sort for the data table, the Profile Default item will be listed as well.
  6. Click (New Sort) to create a new Sort definition from scratch, and click OK. The Define Sort tool displays.

    Or

    Click Profile Default to create a new Sort definition that will use the System Sort as a basis, and click OK. The Define Sort tool displays.

    Or

    Click the name of an existing Sort definition to use it as a basis for a new Sort, or to edit it, and click OK. The Define Sort tool displays.

  7. Use the controls to add, remove and order the data fields (up to five), that will be used for this Sort definition.
  8. Click Save. The Save Sort control displays.

    If you have created a new Sort definition from 'scratch', enter the name (no more than 30 characters) that you want to assign to it and click OK.

    If you have edited an existing Sort definition, click OK to apply the changes to the existing definition.

    If you have created a new Sort definition that used the System Sort or an existing Sort as its basis, enter a new name for it an click OK. This will create a new Sort definition for the linked rows, and leave unchanged the Sort definition that you began with.

    Or

    Click Cancel to return to return to the Define Sort tool.

Notes:

Delete a User Sort Definition

It is important to note that Delete will remove the Sort definition completely from Millennium; if your intention is simply to view the data without a Sort applied, use the Choose Sort or Sort Off menu items instead. See Use a Sort Definition, below.

  1. Log on to the system with your user name and password.
  2. Locate any constituent and access the display of the table whose Sort that you want to delete. It is not necessary for the constituent to have any data in the table.
  3. Point to either the section header Edit button edit button, or the Edit button edit button located to the left of an existing table row.
  4. Point to Options. Click Define Sort. The Open Sort control displays.
  5. From the list of Sort definition names, select the name of the definition you want to delete. Click OK. The Define Sort tool displays.
  6. Click Delete. Click Yes to confirm the Delete, or click No to return to the Define Sort tool.

Delete a User Sort Definition on Linked Data Rows

  1. Log on to the system with your user name and password.
  2. Locate a constituent and access the display of the primary table - the table to which the rows are linked. The constituent must have data in that data table, and at least one row must have linked data rows.
  3. Point to either the linked data section header Edit button edit button, or the Edit button edit button located to the left of one of the linked data rows.
  4. Point to Options. Click Define Sort. The Open Sort control displays.
  5. From the list of Sort definition names, select the name of the definition you want to delete. Click OK. The Define Sort tool displays.
  6. Click Delete. Click Yes to confirm the Delete, or click No to return to the Define Sort tool.

Use a Sort Definition

Within the Profiles World, locate a constituent and access the display of the data table on which the Sort will be applied. If you are applying a Sort on linked data, access the display of the primary data table (the table to which the rows are linked) instead. If you are applying a Sort on linked data, the constituent must have data in the primary data table and at least one row must have linked data rows. If you are not applying a Sort on linked data, then it is not necessary for the constituent to have any data in the data table.

Turning the Active Sort On

  1. Point to the section header Edit button edit button. If you are turning the Active Sort on for linked data, point to the linked data section header Edit button edit button instead.
  2. Point to Options. Click Sort On. The word 'Sorted' plus the name of the Sort will display in the header.

Turn an Inactive Sort On

  1. Point to the section header Edit button edit button. If you are turning the Sort on for linked data, point to the linked data section header Edit button edit button instead.
  2. Point to Choose Sort. Click the name of the Sort definition that you want to use. The word 'Sorted' plus the name of the Sort will display in the header. This will not only apply the newly chosen Sort to the data table or to the linked data, but it will also flag the newly chosen Sort as the Active Sort definition for the table or linked data.

Turn the System Default Sort On

If you are not the system administrator, but you would like to use the System Default Sort definition, you must first access the Define Sort tool to open the Sort - it will be named Profile Default - and then save it with a different name. It is now flagged as your active Sort and has been applied to the data table (if a data table sort) or to the linked data rows (if a linked data sort).

Switch Sorts

  1. Point to the section header Edit button edit button. If you are switching the Sort on linked data, point to the linked data section header Edit button edit button instead.
  2. Point to Choose Sort. Click the name of the Sort definition that you want to use. This will apply the newly chosen Sort to the data table or linked data, and also flags the newly chosen Sort as the Active Sort definition for that table or linked data.

Turn a Sort Off

  1. Point to the section header Edit button edit button. If you are turning off a linked data Sort, point to the linked data section header Edit button edit button instead.
  2. Point to Options. Click Sort Off. The word 'Sorted' and the Sort name are removed from the header.

    OR

    If you are not the system administrator, Point to Options. Click (none). In addition to turning the Sort off, you will no longer have an Active Sort definition. To re-apply a Sort to the data, you must follow the Turning an Inactive Sort On instructions.

Notes:

Sorts and Snapshot View

An Millennium user can display a constituent's data using a Snapshot View. A Snapshot View is a data display defined so that only selected rows from a subset of Millennium's data tables are displayed, and only in a certain order. Each user defines his or her Snapshot View of the data via the Snapshot Setup tool. See User Options, Snapshot Setup for complete details.

Controls which allow the user to gain access to the Define Sort tool are included on the Snapshot Setup tool. These controls enable a user to define a new Sort, edit an existing Sort, or delete an existing Sort, directly from Snapshot Setup. As with the Define Sort tool, these changes are saved to the sorts system table. A user who is not logged on as a system administrator can access any of his or her own Sorts by using the Snapshot Setup tool, and maintain and apply them to the normal data display. If a Sort was deleted by using Snapshot Setup, that Sort is removed from the system and can no longer be accessed when displaying data in any way.

Only one Sort can be created by a system administrator by using the Snapshot Setup utility. This Sort is named 'Snapshot Default' and is owned by millennium_admin. The Snapshot Default Sort can only be accessed from Snapshot Setup and can only be applied to a system administrator's Snapshot View definition. In other words, unlike Sorts created or changed by other users, the system administrator will not be able to use his or her Snapshot Default Sort when displaying data in any way other than in a Snapshot View!

A Sort that is applied here will not affect the way the data is sorted for a user's Snapshot View. Conversely, a Sort that is applied to a user's Snapshot View will not affect the way the data is sorted here.

By using the Copy Snapshot Settings utility, a Sort definition for one user can be copied to one or more other users if that Sort definition was applied to a data table that the user included in his or her Snapshot View definition.

By means of the Copy Snapshot Settings utility, the Snapshot Default Sort definition can be copied to one or more other users if that Sort definition was applied to a data table that the system administrator included in his or her Snapshot View definition. A user who owns his or her own copy of the Snapshot Default Sort for a data table can apply that Sort when the data table is displayed in a way other than in Snapshot View if he or she first edits the Snapshot Default Sort from within the Snapshot Setup tool, and saves it with a different name.

Considerations for Sorting the Actions and Tasks Tables

You should be aware of special fields in the Actions and Tasks tables that are available for the purpose of defining a Sort order for these tables. Most users prefer to see any Tasks or Actions displayed with those that are still pending (not completed yet) shown first. These rows would typically be identified using the Completed Date field ( a blank indicating that it has not been completed). However, the standard SQL handling of such datetime fields (blanks are treated as null values) would not produce the desired display. Therefore, a non-displaying flag field has been included in each of those data tables that automatically reflects whether the Action or Task has or has not been completed (Y or N).

To display pending (non-completed) Actions first:

Choose the actcompflg field in ascending order. This field may be followed by any further refinements to the Sort that you want. A typical Sort definition on the Actions table might be as follows:

actcompflg (ASC), actduedate (ASC), actcompdat (DESC)

This definition would first sort the rows into two groups: those that are not yet completed, and those that are completed. It will then sort each of these Action groups by the date that they were due to be completed, showing the earliest due dates first. Finally, within the two groups, it will sort and display those Actions that were most recently completed before those Actions that were completed earlier.

Note: The Event Actions table also includes a non-displaying flag field (eactcompfl) for the purpose of defining a Sort order for that data table.

To display pending (non-completed) Tasks first:

Choose the taskcompfl field in ascending order. This field may be followed by any further refinements to the Sort that you want. A typical Sort definition on the Tasks table might be as follows:

taskcompfl (ASC), taskduedat (ASC), taskcompdt (DESC)

This definition would first sort the rows into two groups: those that are not yet completed, and those that are completed. It will then sort each of these Tasks groups by the date that they were due to be completed, showing the earliest due dates first. Finally, within the two groups, it will sort and display those Tasks that were most recently completed before those Tasks that were completed earlier.

Top of Page