Categories are a special type of RecordType that contain a relatively short list of options from which a field value can be selected. Categories can optionally allow multiple values.

Categories are particularly beneficial given how they can be referred to in Filters. The Filter condition can simply state the name of a Category value – PYXI will automatically interpret this as meaning ‘any record with/without this Category value’, without even needing to specify the name of the field on which that value is stored.

Fields on a RecordType that are attached to a Category are automatically exposed on the Analyser select screen (analogous to a Pivot Table), allowing rapid evaluation and searching of a set of Records.

Categories are exposed on Forms as Radio or Check buttons (depending on whether set to allow multiple values), with all active values exposed as options. This is in comparison to non-category record types, where a drop-down mechanism is provided to search for a record. Bear this in mind in application design – a Category with dozens or hundreds of values would be unwieldy; but if there are no more than a dozen or so, not specifying a RecordType as a Category would result in a less optimal user interface, and lose the benefits of the improved Filter syntax for Categories.

Categories are particularly useful for storing Status-type fields, where a record moves through different ‘states’, being individual values of a Category, based on user interaction or automated rules.

Another very common usage of Categories is for categorisation of records. For example, in an Assets system, you might have a Category with different categories of Asset e.g. Vehicle, Computer, Phone, PassKey etc. When a Category is used like this, it is quite common to use the Category records to hold the Icons that you wish to display on the ‘master’ record based on its category. See the Icons page for a fuller discussion and worked example of configuration to achieve this.

Icons on Categories

A particularly common use-case for Icons is to have a specific icon on each record (value) of a Category. Further, it is quite common to want to specify the icon of another Record Type as being dependent on the Category value selected i.e. the record takes the same icon as the Category value.

This is achieved using the IconFieldName field of the Record Type, and setting it to the name of the Field containing the Category value.

Below is an example of part of a Blueprint that shows how to set this up. This example assumes you are setting up a main record type for Devices, and a Category that indicates Device Type. Each Category value has a different icon, and you want those icons to appear against the Device records themselves based on their type e.g. all Laptops will show a laptop icon, Servers will show a server icon, etc.

Sample Blueprint

# Set-up a RecordType for a Category called DeviceType [RecordType] Name,isCategory DeviceType,Y # Add the DeviceType Category values themselves, assigning an icon to each value [DeviceType] Name,IconName Server,server Laptop,laptop PC,desktop Mobile,mobile # Set-up the Device RecordType, with a default icon name of <i>laptop</i> and an IconFieldName of <i>DeviceType</i> # Note that if the IconFieldName can't return a value, the standard IconName value will be used when displaying the record [RecordType] Name,IconName,IconFieldName Device,laptop,DeviceType # Add the DeviceType Category to a Field of Device [Field] RecordTypeName, FieldName, FieldTitle, FieldType, LinkedRecordTypeName, SetName Device,DeviceType,Device Type,link,DeviceType,Details