Import file format for record types

This topic provides guidelines for record type import files.

The import file for a record type is a list of delimited, double-quoted strings, ending with a newline character. The most common file format is comma delimited, but you can also use colons, semicolons, pipes, or tabs.

The first row of the import file contains a list of the field names being exported. Subsequent rows contain the field values for the individual records, sequenced by the order of the field names in the first row. During the import operation, the value for each field is converted to the corresponding field type defined in the schema. For example:


 "id","state","submitdate","severity","priority","summary","description" 
 "1","Submitted","4/11/00 7:00:00","3-Workaround","3","The shortcut for "
"Printing"" is grayed out","See summary --John" 
 "2","Opened","4/14/00 11:32:00","1-Crash","1","Can't log in to the system",
"I typed my login and the hourglass sign appears, but after 15 
 minutes, I still can't type my password. There's an infinite loop 
 somewhere." 
 

The value of the State field determines the current state of the record when it is imported. The data types of fields of imported records are validated, but the actions required to reach a particular state are not validated.

When formatting an import file, note these considerations:

  • In a comma-delimited data file, field values can contain embedded commas if they are enclosed within the quotation marks that enclose the field. For example:
    
     "I typed my login and the hourglass sign appears, but after 15 
     minutes, I still can't type my password. There's an infinite loop 
     somewhere."
    
    
  • Embedded quotation marks in field values must be enclosed within quotation marks. For example:
    
     "The shortcut for ""Printing all"" does not work."
    
  • If a field is empty, use " ".
  • Do not include spaces before or after the delimiter character.
  • Before you can import reference fields, you must import values for the referenced record types. The values included in the import file for those fields must exist in the HCL Compass database. These values include users and user groups. To learn more about creating users and users groups, see Working with users.
  • Items in a reference list must be comma-separated in the import file. For example:
    
     "Ref1, Ref2, Ref3"
    
  • Data values can contain carriage returns. For example:
    
     "To reproduce the error, follow these steps:<CR>
    
     1. Start Explorer.<CR>
     2. Click File > Open."
    

    A carriage return can be used to import values into a multiline field.

Supported data types

The values of the fields in the import file are interpreted according to the data type defined for the corresponding field in the HCL Compass schema. The following table lists the supported data types and how the values are interpreted.

Data type Description Behavior
ATTACHMENT_LIST A list of fields with type Attachment Interpreted as a list of path names to attachments.
DATE_TIME SQL date and time Converted to date/time.
INT SQL integer Converted to an integer
MULTILINE_STRING A variable-length character string of unlimited size Inserted as is to the maximum length in the schema for this type.
REFERENCE A reference to a display name in a state-based or stateless record type Interpreted as a key to a stateless record type.
REFERENCE_LIST Multiple references to display names in a state-based or stateless record type Interpreted as a list of references.
SHORT_STRING A variable-length character string with a maximum length of 254 characters Inserted as is.
STATE Reserved for system fields The field value is validated, but the actions required to reach the state are not triggered.