- Print
- DarkLight
- PDF
Import template header configurations
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
Keyword | Metadata type | Obligatory? | Description | Example of use |
Pattern | Reference | No | Corresponds 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 |
Pattern | Date or Date-time | Yes | Allows you to define the date format to use for date or date-time metadata. | actualTransfertDate type=date pattern=yyyy-MM-dd |
type | Date or Date-time | Yes | Allows you to set the type of date to import. Possible values:
| modifiedOn type=datetime pattern=yyyy-MM-dd HH:mm:ss |
separator | Multi-value metadata | Yes | Allows you to define the character to use to separate the values to be imported into a multivalue metadata. | keywords separator=; |
3. Other import options
Keyword | Metadata Description | Example of use | |
---|---|---|---|
importAsLegacyId | id | Allows 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 |
useTitleAsFilename | title | Allows 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 |
keepExtraWhitespace | Text metadata or character string | Allows 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[ ] | Securities | Allows 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] |
# | Scheme | Allows 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".
Keyword | Description | Usage |
---|---|---|
Structure | Specifies that the item to import is part of a Structure metadata. | structure=copyRetentionRules |
Item | Specifies which element of the structure the metadata belongs to. | item=1 |
multiline | Allows 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 |
---|---|---|---|---|---|
P | P | Main | Dm | 2 | |
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 |
S | S | Secondary | Dm | 2 |