The Description attribute is the attribute that has the greatest semantic meaning in a Transaction object.
In other words, it is the attribute that best describes (or represents) the Transaction.
By default, the first attribute in the Transaction structure with a character data type is defined as Description attribute.
The icon with a magnifying glass stands for the Description attribute:
For example, in the Category Transaction, the CategoryName attribute is the Description attribute.
You can define a different attribute as the Description one using the corresponding pop-up menu, or define no Description attribute at all.
A good Description attribute must follow these properties:
- Uniqueness. An attribute can be the Description attribute of only one Transaction.
- Just one attribute. A Primary Key can be composed of many attributes, but a Description attribute must be just one attribute.
- Meaningful for users. For example, CustomerName is better than CustomerId.
- Not ubiquitous. Not all transactions have a Description Attribute.
Because of these properties, a Description attribute is usually a Candidate Key.
The Description attribute is automatically considered and used when GeneXus generates applications. For example, when applying the Work With Patterns to Transaction objects, the Web Panel objects and Panel objects that are automatically generated show the Description attributes with a link that opens a layout that displays more information related to the record involved.
- There can be a Description attribute per level.
- Not all Transactions (or levels) must have a Description attribute.