SORTING YOUR DATA

It's important to be able to sort your data into the required order when you view or publish it, and CatBase provides various ways to do this:

  • Sort data as you are viewing it on-screen (temporary sort)

  • Create and save Sort Formats to automatically sort the data when it is published

  • Use the built-in System Sort Order

 

SORTING DATA ON-SCREEN

When you are viewing a list of records, there are two ways to sort the records you're looking at: a quick sort on one column, and a more complex sort on multiple columns.

QUICK SORT ON ONE COLUMN

Simply click in the column heading of the column on which you want to sort the data. Don't forget that you can manage the columns that appear in the on-screen lists by right-clicking on the list and choosing Add a Column.

SORT ON MORE THAN ONE FIELD

You can sort on most fields in the database. To do this, click on the Sort button at the top of the window 

The Sort Editor window opens (this is described in detail in the Sort Editor reference page). You can also call up the Sort Editor by right-clicking on the list and choosing the Sort option from the pop-up menu.

SORT FORMATS

You can create and save Sort Formats to use in your Publishing Style Sheets or while you are viewing data. Sort Formats can be created by clicking on the Sort button when you are viewing a list of records, or by clicking on the New Sort Format button on the Preferences tab in a Publishing Style Sheet. See the Sort Editor reference page.

THE SYSTEM SORT ORDER

In each data table there is a field called SortOrder. When you add a new record, this field is assigned the next number according to the number of records in the current selection or, if you are importing data, the next sequence number depending on the number of records already in the table. So, it is entirely possible that these SortOrder numbers will contain duplicates. Let's look at this in a meaningful context:

Perhaps your database contains contact details for people working at companies listed in the database. When the company directory is published, all the contacts at each company are listed, but in what order? It isn't alphabetical by last name, or alphabetical by title – it's in a manually-designated order according to each person's position within the company. The SortOrder field can be used to manage this sort order:

  • Open up a Company record

  • Go to the page that shows the list of Contacts in an included list

  • If the SortOrder field is not already included as a column in the list, add it (right-click on the list, choose Add a Column, and select the SortOrder field)

  • Click in the header of the SortOrder column to sort the data by SortOrder.

  • Drag the contact names up or down in the list until they are in the required order

  • CatBase automatically updates the SortOrder when each record is moved

  • Create and save a Sort Format that sorts on the field, SortOrder

  • Select this sort format in your Publishing Style Sheet


The SortOrder can also be changed when you are viewing a list of records in the main list view.

  • Create a selection of just the records you want to sort - eg, all the Contacts for a Company, or all the Parts for a Product, etc.

  • If the SortOrder column is not already shown in the list, right-click on the list, choose Add a Column, and select the SortOrder field.

  • Click on the SortOrder column header to sort the records by their current SortOrder.

  • Right-click on the list and choose Allow Drag to Re-order Records.

  • Now you can select individual records and drag them up or down to re-order them.

  • When you're happy with the sort order, right-click on the list and choose Don't allow drag to re-order records to make sure that you don't accidentally move them around.

crown commercial service logo
Adobe technology partner logo
4D silver partner logo
  • Facebook Social Icon
  • Twitter Social Icon
  • YouTube Social  Icon

© Copyright 2019 CatBase Publishing Systems Ltd.