Skip to content

Customizing a Data Dictionary for the Vendor Table

In this section, you will customize the cVendorDataDictionary 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 on 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 Vendor table to display its Columns, Indexes, Relationships, and Data Dictionaries. You will see cVendorDataDictionary listed.

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

  3. Select the Id column and set the following options in the Data Entry Option group:

  4. Auto Find EQ: True
  5. No Put: True
  6. Protect Value (Key): True

Select the State column and set the Capslock option to True.

  1. Select the Id column, then select the Auto Increment option in the Other group.
    Click on the Prompt (...) button in the Auto Increment option form.
    This will open the Select Auto Increment Table and Column dialog.
    Expand the DFLastID table and select the Vendor_Number column, then click Ok.

  2. Select the State column and set the Visual Control option in the Appearance group to dbComboForm.
    You want to use the same validation table as for the State column in the Customer table.

  3. Click on the Validation Object tab in the Data Dictionary Designer. Then click on the Add Validation Object toolbar button.
    On the Create New Validation Object dialog, type Vendor_State_VT as the Object Name. Select Code Validation Table (database) as the Type.
    Select STATES from the Type Value combo box. This selects the already populated list of states you created when customizing the Customer Data Dictionary.
    Make sure the State column is checked in the Apply to Column list and click Ok.
    This will bring you back to the Validation Objects tab page with a newly created Code Validation Table, and the list of states populated.

  4. Select the Zip column and set the Mask option in the Appearance group to #####-####.

  5. Set the following labels for each column:

  6. Id:
    • Long Label: Vendor Id
    • Short Label: Vndr Id
    • Status Help: Vendor Id Number (system assigned)
  7. Name:
    • Long Label: Vendor Name
    • Short Label: Name
    • Status Help: Vendor Name
  8. Address:
    • Long Label: Street Address
    • Short Label: Address
    • Status Help: Street Address
  9. State:
    • Long Label: State
    • Short Label: St.
    • Status Help: Two Letter State Id
  10. Zip:
    • Long Label: Zip/Postal Code
    • Short Label: Zip
    • Status Help: Zip or Postal Code
  11. Phone_Number:
    • Long Label: Phone Number
    • Short Label: Phone
    • Status Help: Phone Number
  12. Fax_Number:

    • Long Label: Fax Number
    • Short Label: Fax
    • Status Help: Fax Number
  13. Click on the Structure tab page of the Data Dictionary Designer.
    For Key Foreign Field Options, verify that Find Required (and nothing else) is checked.
    For Indexed Foreign Field Options, only No Put should be checked.
    For Default Foreign Field Options, only Display Only should be checked.

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

Next Step

Customizing a Data Dictionary for the Order Header Table