The Import tool: create and update records

New records can be created and existing records updated with the Collections Import tool, which is accessed from the Main menu. Data, typically imported from a CSV file1, can be verified with a Test run option before the import is processed and records in your data sourcesClosed The management of a collection can involve a vast amount of information about objects / items / books, people and organizations, events, administration and more. This information is stored as records in data sources. Each data source stores a specific type of information: details about collection items, people, events, loans, and so on. are added or changed.

Before demonstrating how to use the Import tool, we describe how to construct a CSV import file. Note that building a CSV import file can require details about fields and the data they hold that is only available in Axiell DesignerClosed A tool for designing, creating, customizing and managing Axiell Collections applications and databases, broadly speaking, the Axiell Collections Model Application. As well as managing databases, including user access and permissions, Designer is used for such tasks as translating field labels, tooltips, values in drop lists, etc..

How to build a CSV import file

Fields in Collections can have both:

  • A data storage format: the format in which data is stored in the database.

    -AND-

  • A presentation format: the format in which data displays in the User Interface (UI).

When we build an import file, it is important that we enter data in the file in the format it is stored in the database rather than the format in which it displays in the UI.

Data is imported into Collections in a plain text file with a .csv extension; this can be created in an application such as Notepad or MS Excel:

  1. The header (first) row in the file is a comma separated list of field tags or system field names found in the data sourceClosed The management of a collection can involve a vast amount of information about objects / items / books, people and organizations, events, administration and more. This information is stored as records in data sources. Each data source stores a specific type of information: details about collection items, people, events, loans, and so on. that will be updated (details about how to identify field tags and system field names can be found here).

    Note: You can use a semicolon instead of a comma to separate fields and values, just be consistent and use one or the other.

    Always use English system field names in the header row: if necessary, switch the Interface language to English before checking the system field name. Alternatively, use the field tag, which is the same in all languages.

    The header row is not itself imported: it tells Collections which fields to update.

  2. Subsequent rows contain the comma separated values for each field listed in the header row.

Notes

Import

Details

Checkbox

Here we see the Publish on web (publish_on_web (wp)) field on the Management details panel:

When a checkbox is not selected (it does not contain a tick), it is obviously empty and its value is NULL. When a checkbox is ticked, the value it holds is an x.

To add a tick to a field with a checkbox when importing data, the value you import into the field is an x.

Linked fields

When importing a new value into a Linked fieldClosed A type of field used to link one record to another. A Linked field is a drop list of values (records that the field can link to). When a link is made, the field stores a reference to the linked record (a linkref)., Creatorin the example above for instance, a record will be created in the targetClosed A link is made from a record in one data source (primary) to a record in another data source (target). A data source could be both the primary and target data source in a linking relationship if one of its records links to another of its records. data source and the appropriate domain will be applied too. In the example above, the following record was created and automatically added to the creatordomainClosed A subset of records in an Authority data source, grouping similar sorts of records. When a search or Linked field is associated with a domain, only records in that domain are available to that field. For example, records for authors can be assigned to the AUTHOR domain (using the Name Type / name.type (do) field). When linking a record for a book to a record for its author, the Author Linked field will point to the AUTHOR domain, a subset of records in Persons and institutions exclusively for authors. In the Thseaurus, a record is assigned to a domain using the Term Type / term.type (do) field. (Name type):

Merged-in fields

If you attempt to import data into a Merged-in field, you will receive an error similar to:

Field ‘institution.code’ is a merge field that cannot process data.

Data that displays in a Merged-in field is pulled dynamically from a linked record; it is important to understand that the data is not actually stored in the Merged-in field, it only displays in the field: the data is actually stored in the linked record. As such, data cannot be imported directly into a Merged-in field.

Full details about Merged-in fields, and an explanation for the error message here.

Multilingual fields

When you import data into a multilingual field, data is imported in the current data language. It is important to understand that it is only possible to import data in one language at a time.

Non-unique location names

It is possible to import object / archive records with a new current or default locationClosed it is also possible to update the current location of existing object records but note that this will not update the object's location history; updating an existing object's current location is better achieved with the Change locations task.

Where location names are unique it is possible to link object / archive records accurately by specifying a location name in location.default.name or current_location.name in the import file. A problem arises however when location names are not unique, something like Shelf 1 for instance. In versions of Collections prior to version 1.11, it is not possible to import non-unique location names and expect the link between an object / archive record and a location record to be correct: if there is more than one location called Shelf 1, which is the correct Shelf 1? Collections version 1.11 onwards provides a solution for this issue:

Occurrences

If a field is repeatable, multiple occurrences can be imported by repeating the field name / tag column for each occurrence.

Next we describe how to import your data with the Import tool.