Designer - How To:
A simple yet very powerful feature in Quick Objects Designer allows you to mark it for generating an Enum that represents the data in the underlying database table. For example: A typical application may have a set of "Roles" defined in a table and those role values are often used in many places in code. Instead of hard coding each value a good practice would be to create an enumeration. However, creating an enumeration may cause the enumeration to get out of date over a period of time if the underlying data in the database changes. The enumeration generation feature in Quick Objects Designer eliminates this problem. Not only can the designer generate the enumeration, but it can also keep it in sync with the underlying database. Simply regenerate the base class file(s) and the enumeration will be updated as well.
Each table object in the designer has the following properties that can be used to take advantage of the Enum feature.
- Create Enumeration - The designer will only generate the enumeration if this value is set to True.
- Enumeration Text Field - Any field that is of type String and should be used as the text representation of the enum value.
- Enumeration Value Field - Any field that is of type capable of being an enum. This value is usually the primary key column value.
- Enumeration Name - You can actually control the name of the generated enumeration.
Once these settings are saved, the enumeration will be automatically generated every time you generate the base class files. If the underlying data changes you simply need to regenerate to ensure that the enumeration is in sync with the underlying data.
![]() |
All numeric field objects in the Business Logic Framework provide an overloaded "Parse" method that takes an Enum as a parameter and assigns the enum value to the Value property. |

Click to enlarge