Adding categories to views

About this task

A category is a grouping of related documents. A view that displays categories enables users to find those related documents. For example, in an employee view, you can create a category called Ohio and include in that category documents created by only those employees who work in Ohio. A categorized view is neat and easy to scan. Users can collapse the categories to display only the category names, and then expand categories individually, or expand the whole view.

A categorized view

To categorize a view

Procedure

  1. Create a column to display categories.
  2. Select the option "Type: Categorized" on the Sorting tab of the Column Properties box. Choose a sort order of Ascending or descending. (Ascending order organizes the categories in alphabetical order and descending order in reverse alphabetical order.)

    The resulting column, called a categorized column, groups documents with matching values and converts the common value to a category name. The column is usually one that appears on the left side of the view.

    It is often necessary to have a sorted column to the left of the categorized column for the categories to sort in a way other than alphabetical order. For example: If you want to categorize documents by their Status field, and you have the categories appear in the following order: Draft, Submitted, In Review, Published, Superseded. Since this is not alphabetical, you can accomplish this by having two columns: first, a hidden sorted column with the following formula:

Results

@If(Status = "Draft"; 0;
 Status = "Submitted"; 1;
 Status = "In Review"; 2;
 Status = "Published"; 3;
 Status = "Superseded"; 4;
 5
)

Then, a categorized column which is not hidden, with the formula:

Status

You can have a sorted column to the left of the categorized column; but if you do, the categorization will take place only among groups of documents that have the same value in the previous sorted columns.

Other options include:

  • (Recommended) At the Font tab of the Column Properties box, choose a different color for column text and use bold face to make categories stand out.
  • (Recommended) At the Column Info tab of the Column Properties box, select "Show twistie when row is expandable" to display a twistie that users click to see categorized documents.
  • At the Options tab of the View Properties box, select "Collapse all when database is first opened" to show only the category names when users open the view.
  • At the Style tab of the View Properties box, select "Don't show empty categories" so that categories without documents are not listed.