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
-
In Table Explorer, expand the Vendor table to display its Columns, Indexes, Relationships, and Data Dictionaries. You will see
cVendorDataDictionarylisted. -
Double-click on the
cVendorDataDictionaryclass. The class will now open in the Studio's Data Dictionary Designer. -
Select the Id column and set the following options in the Data Entry Option group:
- Auto Find EQ: True
- No Put: True
- Protect Value (Key): True
Select the State column and set the Capslock option to True.
-
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. -
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. -
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, typeVendor_State_VTas 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. -
Select the Zip column and set the Mask option in the Appearance group to
#####-####. -
Set the following labels for each column:
- Id:
- Long Label: Vendor Id
- Short Label: Vndr Id
- Status Help: Vendor Id Number (system assigned)
- Name:
- Long Label: Vendor Name
- Short Label: Name
- Status Help: Vendor Name
- Address:
- Long Label: Street Address
- Short Label: Address
- Status Help: Street Address
- State:
- Long Label: State
- Short Label: St.
- Status Help: Two Letter State Id
- Zip:
- Long Label: Zip/Postal Code
- Short Label: Zip
- Status Help: Zip or Postal Code
- Phone_Number:
- Long Label: Phone Number
- Short Label: Phone
- Status Help: Phone Number
-
Fax_Number:
- Long Label: Fax Number
- Short Label: Fax
- Status Help: Fax Number
-
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. -
Click the Save File toolbar button (or press
Ctrl + S) to save the Data Dictionary.