Sort – Bookmark Templates

This entry is part 8 of 19 in the series Setup Guide - Bookmark Templates

The RR_ and RC_ prefixes process repeating data, and you can use the xSort_ prefix to sort rows or columns in tables containing these bookmarks.

The xSort bookmark can be used to sort any or all tables in your template.

In most bookmarks, the bookmark is placed in the location were you what the data to be placed – BUT the xSort and xFilter bookmark are different. These bookmark give Spitfire a command to Sort or Filter an existing bookmark with specific criteria.

The xSort bookmark has multiple parts: xSort_alias  =  fieldname  *
* Ascending order is the default so if you leave it blank, Spitfire will use Ascending (1-10, A-Z) order. If you want Descending (10-1, Z-A) add DESC

 

To sort all references to an alias in your template:

  1. In an unused area type xSort_Alias = fieldname DESC 
    where Alias is the Spitfire alias and fieldname is the name of the field you want to sort. If you want to sort by more than one field, fieldnames must be separated by a comma. If you want a field to be sorted in descending order, include DESC (10-1, Z-A) after the fieldname. Ascending order (1-10, A-Z) is the default.
  2. Format this line has Hidden Text.
  3. Highlight the text following the equals sign (=).
  4. From the Insert ribbon, click Bookmark.
  5. In the Bookmark name field, enter the text before the equals sign (xSort_DocItem).
  6. Click Add.

Example
If you had a table with the following bookmarks

Quote. RR_DocItem_OriginalQuote
Description RR_DocItem_Description

and you wanted to sort by description in descending order, you would type:
xSort_DocItem_Description DESC

To sort a list within multiple tables in your template:

  1. Click the table selection icon to highlight the table you would like to sort.
  2. From the Insert ribbon, click Bookmark.
  3. In the Bookmark pop-up window, enter any name that either begins or ends with the word “Table”.
  4. Click Add.
  5. Use this bookmark name to create a new prefix by adding it to the xSort prefix. (ex: xSortTable1_)
  6. Follow the directions for using the xSort_ prefix but use your newly created xSortTablename_ prefix in its place. (ex: xSortTable1_DocItem = Description )

Table 1:  Items sorted by Description   xSortTable1_DocItem = Description

RR_1_DocItem_Description RR_1_DocItem_OriginalQuote

 

Table 2: Items sorted by Quote    xSortTable1_DocItem = OriginalQuote DESC

RR_2_DocItem_OriginalQuote RR_2_DocItem_Description
Series Navigation<< Special Bookmarks and Hidden TextFilter – Bookmark Templates >>