Import template header configurations
  • 19 Oct 2022
  • 2 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Import template header configurations

  • Dark
    Light
  • PDF

Article summary

1. Import Template Header Configurations

Each column in the header of an import template corresponds to a metadata of the schema to be imported. Each column must therefore necessarily begin with the code of the metadata to be imported. Other parameters must then be added to the header to specify additional information about the metadata or the values to import, depending on the metadata in question. These additional parameters must be added in the same cell, on a new row (Shift+Enter to insert a new row).

2. Metadata options

KeywordMetadata typeObligatory?DescriptionExample of use
PatternReferenceNoCorresponds to the metadata of the referenced schema to be used to bind. For example, to link a folder to its parent using the metadata "Code", we would write pattern=code in the column header.
If "pattern" is not specified, the legacyld (old identifier) is used by default.
relative
pattern=code
PatternDate or Date-timeYesAllows you to define the date format to use for date or date-time metadata.actualTransfertDate
type=date
pattern=yyyy-MM-dd
typeDate or Date-timeYesAllows you to set the type of date to import.
Possible values: 
  • date
  • datetime
modifiedOn
type=datetime
pattern=yyyy-MM-dd
HH:mm:ss
separatorMulti-value metadataYesAllows you to define the character to use to separate the values to be imported into a multivalue metadata.keywords
separator=;

3. Other import options

KeywordMetadata Description
Example of use
importAsLegacyIdidAllows you to use the ID generated in Constellio instead of the old ID during import.
(To update existing records that were not created by import.)
id
importAsLegacyId=false
useTitleAsFilenametitleAllows you to update the title of the contents of a document when you change the title of an existing document by import template.title
useTitleAsFilename=true
keepExtraWhitespaceText metadata or character stringAllows you to keep the spacing characters (line break, tab, etc.) in the imported values.
By default, these characters are truncated automatically.
description
keepExtraWhitespace=true
cellRange[ ]SecuritiesAllows you to import a range of values instead of the contents of the cell.

The sequence of characters inserted in the square brackets must correspond to an Excel value range that is valid, either on the same page or on a different page.

The contents of the referenced cells will be concatenated before being imported as a value for the cell in question.

CAUTION : This keyword is used in values rather than in the header of a column.
cellRange[B1:E1]
#SchemeAllows you to define a page in the Excel spreadsheet that should not be considered in the import.

CAUTION : This symbol is used in the page name rather than in the header of a column.
#Feuille1

4. Importing structures

To import "Structure" metadata, the "structure" keyword must be added to the header and then import each metadata in the structure into its own column. The different elements of the structure are denoted by the keyword "item".

KeywordDescriptionUsage
StructureSpecifies that the item to import is part of a Structure metadata.structure=copyRetentionRules
ItemSpecifies which element of the structure the metadata belongs to.item=1
multilineAllows you to create substructures on multiple lines.multiline=true

4.1 Example

4.1.1 XML Structure

XML
<copyRetentionRules multivalue="true" type="structure">
    <item copyType = "P"code="P" title="Principal" description="" mediumTypes="DM" activeRetentionPeriod="2"/>
    <item copyType = "S"code="S" title="Secondaire" description="" mediumTypes="DM" activeRetentionPeriod="2"/>
</copyRetentionRules>

4.1.2 XML Import Template Structure

copyType
structure=copyRetentionRules
item=1
code
structure=copyRetentionRules
item=1
title
structure=copyRetentionRules
item=1
description
structure=copyRetentionRules
item=1
mediumTypes
structure=copyRetentionsRules
item=1
separator=;
pattern=code
activeRetentionPeriod
structure=copyRetentionRules
item=1
PPMain
Dm2
copyType
structure=copyRetentionRules
item=2
code
structure=copyRetentionRules
item=2
title
structure=copyRetentionRules
item=2
description
structure=copyRetentionRules
item=2
mediumTypes
structure=copyRetentionRules
item=2
separator=;
pattern=code
activeRetentionPeriod
structure=copyRetentionRules
item=2
SSSecondary
Dm2



Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.