Importing errors: The field x is mandatory; record # n


When importing data, you get an error message telling you that a certain field is mandatory


In every database, certain fields are mandatory: they must be populated (have something entered) or the record cannot be saved. Some mandatory fields,, such as RecordNumber and Enter Date, will be filled in automatically by CatBase if you don't supply a value. There is only one field in every table for which you MUST supply a value, and that is the Key Field. It probably isn't called "Key Field" in your database; it is probably called something like Company Name or Last Name or Part Number. You can easily check on what the field is called in your database: Click on the Setup button on the main window, choose Table and Field Setup, and select the appropriate table. The Key Field is the one that is highlighted in green.

The third type of mandatory field are the user-specified ones. These are your own fields that you have determined must be filled for each record. To make a user-defined field mandatory (or remove the Mandatory requirement):

  1. Click on the Setup button on the main window and choose Table and Field setup
  2. Select the appropriate table from the tabs at the top of the window
  3. The user-defined fields are the ones that have no highlight colour (ie, they have a white background)
  4. Double-click on the field in question
  5. This will open the Field Properties dialogue
  6. One of the check boxes in Field Properties is Mandatory. Select this option to make a field Mandatory; un-select it to remove the Mandatory requirement
  7. Click OK to save your changes

Setting an automatic default value for a mandatory field

In some cases, you may want to have a default value put into a field for each new record. For example, in a telephone directory you might have a field called Entry Style. This determines how each listing will be formatted when it's published. Initially, each new record will have a "Free" entry style unless specified otherwise. You can use the Default Value option in the Field Properties dialogue to specify this:

    Open the Field Properties dialogue for the appropriate field
  1. Select the Default Value check box
  2. A new field appears. Enter your default value into this text field
  3. Click OK to save it

The Default Value option works for both Mandatory and non-mandatory fields.

Go to