Types of records in Advanced CSV files
WorldServer Advanced CSV import files have two types of records: header records and data records.
The header record
There is only one such record, and it must appear as the first record in the file. The inclusion of this record is mandatory. The values of this record provide field names for the records that follow. WorldServer uses these field names to identify the meaning of the field data. The ordering of the field names is not specified, but the ordering must be consistent with the field values in subsequent records.
There are some well-known field names. These correspond to attributes defined in WorldServer. Some are mandatory, while others are optional with default values provided:
All other field names are assumed to be user-defined within WorldServer. Because user-defined attributes on term and term entries can have the same name, by convention, all field names for term entry attributes must append a suffix of -Entry. For example, if there is a user-defined term entry attribute named MyAttribute, the corresponding field name in the header record must be MyAttribute-Entry. This is true regardless of whether or not there is a term attribute defined with the same name.
| Field name | Description | Required | Default |
|---|---|---|---|
| Language | The locale associated with the term. | Yes | N/A |
| Term | The text of the term. | Yes | N/A |
| Created On | The creation time of the term. | No | Current timestamp |
| Created By | The user who created the term. | No | Current user |
| Modified On | The time when the term was last modified. | No | Current timestamp |
| Modified By | The user who modified the term. | No | Current user |
| Created On-Entry | The creation time of the term entry. | No | Current timestamp |
| Created By-Entry | The user who created the term entry. | No | Current user |
| Modified On-Entry | The time when the term entry was last modified. | No | Current timestamp |
| Modified By-Entry | The user who modified the term entry. | No | Current user |
The data record
Data records provide the field values that correspond to field names as defined in the header record. The important aspects of data records are:
- Values for entry attributes are only collected on the first record for each term entry.
- A new term entry is recognized when one or more blank lines are encountered. A blank line is a line with only white space followed by an end of line. All records that follow are assumed to belong to the same term entry until another blank line is encountered or end of file is reached.
- Timestamp values for all WorldServer-defined term and term entry attribute values must use the following format: mm/dd/yy hh:mm am/pm (or the equivalent format for the regional settings you have selected).
Although the ordering of the fields is not important for importing term data, you should order fields as follows, to make viewing and editing of data in a spreadsheet easier:
Also, .csv files exported by WorldServer include two special system-defined attributes as the last two field values of the record - namely Entry Id and Term Id. These values are specific to .csv files exported from WorldServer. Do not modify the values of these fields. .csv term import files that were not exported from WorldServer must not include these fields.
| Field number | Field name | Description |
|---|---|---|
| 1 | Language | The locale associated with the term. |
| 2 | Term | The text of the term. |
| 3-N | User defined | All user-defined term attributes. |
| N+1 | Created On | The creation time of the term. |
| N+2 | Created By | The user who created the term. |
| N+3 | Modified On | The time when the term was last modified. |
| N+4 | Modified By | The user who modified the term. |
| (N+4)+I | User defined | All user-defined term entry attributes. |
| (N+4)+I+1 | Created On-Entry | The creation time of the term entry. |
| (N+4)+I+2 | Created By-Entry | The user who created the term entry. |
| (N+4)+I+3 | Modified On-Entry | The time when the term entry was last modified. |
| (N+4)+I+4 | Modified By-Entry | The user who modified the term entry. |