Uniqueness Across Single or Multiple Parameters
There are occasions where you want a number of components of an item to be unique, aside from its Identifier. Attribute sets allow you to specify combinations of attributes that are to be unique for an item type.
Set Components
They can be defined for requirements and system notes. Each attribute set can contain one or more attributes chosen from:
- Key
- Category (single value and multiple value categories)
Sets
You can define as few as one or as many as thirty three attributes (all categories and the key) for each set.
An item type can have multiple attribute sets.
In Practice
As an easy to explain concept, this example shows an asset register. The managers of the multiple Town Lodge sites each have assets installed in the building. To aid maintenance and asset recording, they want to ensure combination of:
- the Building it’s in
- the Location within the building
- the Item type for the equipment
- and an identifying index
are unique.
By setting each of these components as categories in the ASSET item type, and then selecting Attribute Sets adding an Attribute Set called “Asset identifier” made from these categories, they can check for uniqueness.
As the user is assigning new items into the asset register, when they attempt to save the item, a uniqueness check is calculated. In this instance the combination has been used before, so the user is not allowed to save this item. In this case all they need to do is up the index of the ‘routers’ in the reception area. Obviously this can be any meaningful combination for your project.
Note:
These Attribute Sets checks are not as restrictive as an item’s identity. You would not be allowed to create a duplicate ID/Version/Draft of an item in the database. It is applied when editing and saving an item. This allows you to freely copy items without having to decide on multiple unique combinations at the instant of copying. On subsequently editing and attempting to save the item, the checks would be performed. In a similar manner to ‘Mandatory Categories’.