Import Rules for Lists¶
You can export custom lists to XML files and import custom lists from XML files. There are some rules for the import process when importing already existing lists.
XML format¶
The following listing shows an XML export for a cascaded option list with two main options (EMEA and Americas).
<?xml version='1.0' encoding='UTF-8'?>
<ns2:trackplusExchange xmlns:ns2="http://www.trackplus.com/exporter/" version="4.0.0">
<entityExchange entityId="1002" type="TListBean">
<entityAttribute name="name"><![CDATA[Customer List]]></entityAttribute>
<entityAttribute name="repositoryType"><![CDATA[2]]></entityAttribute>
<entityAttribute name="objectID"><![CDATA[1002]]></entityAttribute>
<entityAttribute name="description"><![CDATA[A list with customers]]></entityAttribute>
<entityAttribute name="listType"><![CDATA[3]]></entityAttribute>
<entityAttribute name="owner"><![CDATA[1]]></entityAttribute>
<entityAttribute name="deleted"><![CDATA[N]]></entityAttribute>
<subEntityRelation parentAttributeName="list" type="TOptionBean">
<trackEntity entityId="1004" type="TOptionBean">
<entityAttribute name="label"><![CDATA[Americas]]></entityAttribute>
<entityAttribute name="CSSSTyle"><![CDATA[]]></entityAttribute>
<entityAttribute name="symbol"/>
<entityAttribute name="objectID"><![CDATA[1004]]></entityAttribute>
<entityAttribute name="isDefault"><![CDATA[N]]></entityAttribute>
<entityAttribute name="sortOrder"><![CDATA[2]]></entityAttribute>
<entityAttribute name="list"><![CDATA[1002]]></entityAttribute>
<entityAttribute name="deleted"><![CDATA[N]]></entityAttribute>
</trackEntity>
<trackEntity entityId="1009" type="TOptionBean">
<entityAttribute name="label"><![CDATA[EMEA]]></entityAttribute>
<entityAttribute name="CSSSTyle"><![CDATA[]]></entityAttribute>
<entityAttribute name="symbol"/>
<entityAttribute name="objectID"><![CDATA[1009]]></entityAttribute>
<entityAttribute name="isDefault"><![CDATA[N]]></entityAttribute>
<entityAttribute name="sortOrder"><![CDATA[3]]></entityAttribute>
<entityAttribute name="list"><![CDATA[1002]]></entityAttribute>
<entityAttribute name="deleted"><![CDATA[N]]></entityAttribute>
</trackEntity>
</subEntityRelation>
<subEntityRelation parentAttributeName="parentList" type="TListBean">
<trackEntity entityId="1003" type="TListBean">
<entityAttribute name="parentList"><![CDATA[1002]]></entityAttribute>
<entityAttribute name="objectID"><![CDATA[1003]]></entityAttribute>
<entityAttribute name="listType"><![CDATA[4]]></entityAttribute>
<entityAttribute name="name"><![CDATA[Configure child 1]]></entityAttribute>
<entityAttribute name="deleted"><![CDATA[N]]></entityAttribute>
<entityAttribute name="childNumber"><![CDATA[1]]></entityAttribute>
<subEntityRelation parentAttributeName="list" type="TOptionBean">
<trackEntity entityId="1007" type="TOptionBean">
<entityAttribute name="label"><![CDATA[GE]]></entityAttribute>
<entityAttribute name="CSSSTyle"><![CDATA[]]></entityAttribute>
<entityAttribute name="symbol"/>
<entityAttribute name="objectID"><![CDATA[1007]]></entityAttribute>
<entityAttribute name="isDefault"><![CDATA[N]]></entityAttribute>
<entityAttribute name="parentOption"><![CDATA[1004]]></entityAttribute>
<entityAttribute name="sortOrder"><![CDATA[1]]></entityAttribute>
<entityAttribute name="list"><![CDATA[1003]]></entityAttribute>
<entityAttribute name="deleted"><![CDATA[N]]></entityAttribute>
<referredDependency dependencyId="1004" dependencyEntityType="TOptionBean"
attributeName="parentOption"/>
</trackEntity>
<trackEntity entityId="1008" type="TOptionBean">
<entityAttribute name="label"><![CDATA[Honeywell]]></entityAttribute>
<entityAttribute name="CSSSTyle"><![CDATA[]]></entityAttribute>
<entityAttribute name="symbol"/>
<entityAttribute name="objectID"><![CDATA[1008]]></entityAttribute>
<entityAttribute name="isDefault"><![CDATA[N]]></entityAttribute>
<entityAttribute name="parentOption"><![CDATA[1004]]></entityAttribute>
<entityAttribute name="sortOrder"><![CDATA[2]]></entityAttribute>
<entityAttribute name="list"><![CDATA[1003]]></entityAttribute>
<entityAttribute name="deleted"><![CDATA[N]]></entityAttribute>
<referredDependency dependencyId="1004" dependencyEntityType="TOptionBean"
attributeName="parentOption"/>
</trackEntity>
</subEntityRelation>
</trackEntity>
</subEntityRelation>
</entityExchange>
</ns2:trackplusExchange>
The following table describes the entity attributes of the XML file.
Attribute |
Description |
---|---|
entityId |
Only a number; you can enter any number here, it will not be used in the import process. |
type |
TListBean for the list, and TOptionBean for an entry in this list. |
repositoryType |
“0”=private, “1”=workspace, “2”=public. |
objectID |
A number. For a list (TListBean), it is not used in the import process. For an option (TOptionBean), it is used as an identifier in case you want to change other properties of this option through an import. |
listType |
“1” for a simple, single-level list of options. |
name |
The name of the list. The name is visible in the administration user interface. |
owner |
The primary key of the owner of this list from the TPERSON table. “1” is the user “admin”. |
deleted |
“Y” or “N”; marks this entry as obsolete and you can no longer select this option. However, it will still appear in entries where it was used. |
CSSStyle |
An optional CSS style applied to a row in the Item Navigator if an item has a property with this option. |
symbol |
An optional symbol that can be displayed in the Item Navigator. |
isDefault |
Marks this option as default. |
sortOrder |
Sets the order in which the options are displayed in the components of the selection user interface. |
label |
The label of the option as the end user will see it. Note that you can localize option labels later using the localization editor. |
list |
The objectID of the list to which this option belongs. It is not used in the import process. |
The following listing shows a minimized example of a list definition that can be imported into Allegra.
<?xml version='1.0' encoding='UTF-8'?>
<ns2:trackplusExchange xmlns:ns2="http://www.trackplus.com/exporter/"
version="4.0.0">
<entityExchange entityId="1008" type="TListBean">
<entityAttribute name="repositoryType">2</entityAttribute>
<entityAttribute name="objectID">1008</entityAttribute>
<entityAttribute name="listType">1</entityAttribute>
<entityAttribute name="name">Simple global list</entityAttribute>
<entityAttribute name="owner">1</entityAttribute>
<entityAttribute name="deleted">N</entityAttribute>
<subEntityRelation parentAttributeName="list" type="TOptionBean">
<trackEntity entityId="1023" type="TOptionBean">
<entityAttribute name="label">Entry A slg</entityAttribute>
<entityAttribute name="list">1008</entityAttribute>
</trackEntity>
<trackEntity entityId="1024" type="TOptionBean">
<entityAttribute name="label">Entry BN slg</entityAttribute>
<entityAttribute name="list">1008</entityAttribute>
</trackEntity>
</subEntityRelation>
</entityExchange>
</ns2:trackplusExchange>
Import Rules¶
It is assumed that a list already exists in the database if all of the following properties match:
The name of the list
The repository type
The list type
The workspace, if any
The parent list identifier, if any
An option is considered to already exist if all of the following properties match:
The label
The list to which it belongs
The parent option for cascaded lists
If you change the list name, a new list is created during import.
If you change the name of an option and keep the list name, a new option is added to the list.
If you select the “Delete child items” option, any child item in the list that is not in the XML file is deleted during the import.
If you check the “Overwrite Existing” option, properties that are not used for identification are removed from the original list during the import process. This way you can change descriptions, symbols, and CSS, but not the name or label of a list or option.