Adding fields to a record type

Each record type has a Record Fields grid that shows its associated fields. You can use this grid to add fields to the record type and to modify field properties.

Before you begin

When naming fields, do not use keywords that are reserved by the database vendor. See your vendor documentation for a list of reserved keywords.

Procedure

To add a field to a record type:
  1. Start the Designer.
  2. In the Schema Repository Explorer view, expand the Record Types folder in your schema and then click on a record type.
    The record type editor opens.
  3. Click on the Fields tab to view the Record Fields grid.
  4. Right-click on the Record Fields grid and click New Field.
    The New Field window opens.
  5. Type a name for the new field in the Field Name field.
  6. In the DB Column Name field, type a name that will be used for the table column. You may want to use the same name as the field name.
  7. In the Type field, select a field data type.
  8. Select the Visible In Query option to ensure that this field is included in queries run from the HCL Compass Client. If you do not want to include this field in queries, clear this option.
  9. If you chose REFERENCE, REFERENCE_LIST, or SHORT_STRING for the field type, click Next to provide additional information:
    • For fields of type SHORT_STRING, enter a value in the Max Length field to specify the maximum length of the string. This value cannot exceed 254 characters. You cannot modify this value after you check in the schema.

      Storage space in the database is reserved for the maximum length of a field. To save storage space, set the maximum length to be as short as possible. Values that exceed the maximum field length are truncated.

    • For fields of type REFERENCE and REFERENCE_LIST, select a record type to which the field refers. The record type can be state-based or stateless. You can also enter an optional back-reference field to create a link from the referenced record back to this field record. For more information, see Using fields to link records.
  10. Click Next.
  11. Enter optional Help Text for the new field and then click Finish.

What to do next

To make the new field available to users:
  • You must associate the field with a form control. For more information, see Working with form controls.
  • You must check in the schema and apply the new schema version to the user database.

After you check in the schema, you cannot change the type, size, or DB column name properties of the field. However, you can change the name that you use to refer to the field.