Creating a field

You can create or edit a field that is specific to an entity or link type, or a standard field that is common to all entity and link types. The options that are available are specific to the type of field that is being created.

Procedure

  1. Select whether to create a field that is specific to an entity or link type, or a standard field that is common to all entity and link types:
    1. To create a field for a specific entity or link type, in the left pane, right-click the entity or link type and select New Field.
    2. To create a standard field, in the left pane, double-click Standard Fields.
  2. Enter a name for the field.
    The maximum length of a name is 50 characters. The field names within each entity or link type must be unique, and if the field is a standard field, the name must be unique to the database.
  3. Enter a description in the Description box.
    This can help others to understand what kind of data this particular field should be used for, and therefore ensure that the right sort of data is added to the database.
  4. From the Type list, select the type of field.
    See Field Types for information on the different field types.
  5. If appropriate:
    1. Select the maximum number of characters you wish to allow in an Text field. You can set any value in the range 1 through 255.
    2. Enter a display format. Select from the Display Format list, or click in the box and enter a format. For details of all the formats, see Field Types.
    3. Select a Default Value. This is an initial suggested value for the field. You can enter a different value, either as a fixed value or as a code for data such as the creation date of the record.
    4. For a calculated field type (which is a field based on the content of another field), click Define to open a dialog for defining the calculation, or selection of data to show in this field.
      For example, you can choose to display the day of the week corresponding to a date field.
    5. Specify a Chart Attribute for the field. You can use any attributes you have already defined for this database or define a new chart attribute, by clicking New to display the Creating chart attributes.
  6. Where appropriate, use these options to control how iBase will use this field:
    OptionDescription
    Indexed Turn on this checkbox to create an index on the field. This can also increase the speed of searching in this field. Do not index Yes/No fields or fields with less than five allowed values.
    Note: Not all field types can be indexed. These include calculated fields, hyperlink fields, Multi-Line Text fields and system fields such as Create Date.
    Mandatory Turn on this checkbox to force users to enter a value in this field when creating or editing the relevant entity or link. In iBase, mandatory fields are displayed with a blue label.
    Discriminator Turn on this checkbox to mark this field as one that marks a record as unique, as an aid to avoiding record duplication. If there are several discriminator fields, it is the combination of their values that must be unique.
    Characteristic Turn on this checkbox to make the field a characteristic field. For example, the color and style of a vehicle may be a characteristic that is useful when finding vehicles in the Matching Records dialog.
  7. Enter a short description of the field. The description appears as a tooltip for the field.
  8. If required, assign a semantic type to the field. This displays the Select Semantic Type dialog.
    For further information, see Assigning Semantic Types to your data.
    Note: You must assign each standard field to a semantic type that is unique to the database. Other fields can be assigned to any semantic type provided that it is unique to the entity or link type.
  9. Click OK to save the field.

Results

The field is created.

If you later edit a field, there are some limitations on what you can change. For example, you are unable to change the type of a Currency field, and you can change a Text field only to a field of a related type, including Multi-Line Text and Suggested from Code List.

If you make an existing text field mandatory and there are any existing records with this field blank, iBase Designer fills those record fields with a single hyphen (or minus) character, that is, the value "-".

In this context, text fields are:

  • Hyperlink

  • Selected/Suggested from Code List

  • Text

Note: To prevent data loss, you cannot reduce the size of a field. The only way to do this is export the data to be truncated along with the record ID, then delete the field and create a new one of the correct size. Before importing the data using record ID matching, you must ensure that the data is the correct size for the target field. For further information, see Importing and exporting data.