Skip to content

Customizing a Data Dictionary for the Sales Persons Table

In this section, you will customize the cSalesPersonDataDictionary that was automatically created when you created the table. You will add some business rules and other settings to the Data Dictionary. The reason for each Data Dictionary setting you apply will be explained.

The exceptions are business rules already explained when you created the previous Data Dictionaries in the Customizing the Data Dictionaries book. Most explanations can be read in the Customizing a Data Dictionary for the Customer Table page, since this is the first Data Dictionary created.

Steps to Customize the Data Dictionary

  1. In Table Explorer, expand the SalesPerson table to display its Columns, Indexes, Relationships, and Data Dictionaries. You will see cSalesPersonDataDictionary listed.

  2. Double-click on the cSalesPersonDataDictionary class. The class will now open in the Studio's Data Dictionary Designer.

  3. On the Data Dictionary Designer's Columns tab page:

  4. Select the Id column and set the Auto Find EQ option in the Data Entry Option group to True.
    The sales person Id is not system-assigned -- users must enter a valid Id. Auto Find EQ will ensure that the Id is unique. If the Id already exists, the existing record will be automatically found.
    Also set Capslock, Required, and Protect Value (Key) to True for the Id column.
    This option combination sets the column options to require and automatically find a sales person record and to convert all data entered into the associated form into uppercase.

  5. Select the Id column and set the Long Label option in the Appearance group to Sales Person Id. Set the Short Label to Id.
    Select the Name column and set the Long Label option to Sales Person Name. Set the Short Label to Sales Person Name.

  6. Select the Id column and set the Status Help option in the Appearance group to Sales Person Id code - Upper-case alpha.
    Select the Name column and set the Status Help option to Sales Person name - first and last.

  7. Click on the Structures tab page of the Data Dictionary Designer.
    For Key Foreign Field Options, verify that Find Required and No Put are checked.
    For Indexed Foreign Field Options, just No Put should be checked.
    For Default Foreign Field Options, just Display Only should be checked.

  8. If the Code Explorer window is not open, click on the Code Explorer toolbar button.
    You may have to click on any focusable window in the Data Dictionary Designer, such as the Class Name form, for Code Explorer to populate.
    Select the cSalesPersonDataDictionary class in Code Explorer.

  9. Click on the Properties toolbar button to open the Properties window.
    Set the Cascade_Delete_State property to False.
    Business Rule #10 states that if a sales person is responsible for any existing orders, you cannot remove that sales person’s record from the SalesPerson table. Disallowing Cascade Deletes enforces that rule.

  10. Click the Save File toolbar button (or press Ctrl + S) to save the Data Dictionary.

Next Step

Customizing a Data Dictionary for the Vendor Table