Using Database Views

The #VIEW command can be used to set the current database view, and can also be used to change the sort order or column order or to create a whole new view. The first argument is the Name of the view. The Name doesn't have to match exactly...just giving the first few unique characters is good enough. For example, if you have a view called Weapons, doing #VIEW w will set it as the current view. To create a new view, specify a name that does not yet exist.

The second argument of the #VIEW command is a string list of columns to specify the sort order. If omitted, the sort order is not changed. If a minus sign (-) is placed in front of the field name, it is sorted in reverse order. To clear all sorting for the view, use a second argument of just a minus sign:

#VIEW Weapons {-Hit|Name}}

will sort the Weapons view in reverse order of the Hit field, then in order of the Name field.

#VIEW Weapons {-}

will clear all sorting of the view.

The third argument of the #VIEW command is the string list of columns to display. If omitted or blank, the current columns are kept.

#VIEW NewView {Name} {Name|Hit|Dam|Comment}

will create a new view with the name NewView sorted by the Name field, and displaying the Name, Hit, Dam, and Comment fields in columns.

The #VIEW command can also be used to refresh the current view (resort and reapply filters) and optionally display it to the MUD window. If the first argument is blank or zero, the view is displayed to the MUD Window. If non-zero, the view is refreshed but not displayed.

The optional fourth parameter to the #VIEW command can be set to non-zero to specify a pivot table, which is described in the Advanced Database section.



Contents Accessing Database Records Setting View Filters