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 item when importing existing lists.

XML Format#

The following listing shows an XML export for a cascaded options list with two main options (EMEA and America).

<?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.

Property

Description

entityId

Just a number; you can enter any number here, it is not used by 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 by the import process. For an option (TOptionBean), it is used as an identifier if 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 UI.

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 be displayed in the items where it was used.

CSSStyle

An optional CSS style applied to a row in the item browser when an item has an attribute with this option.

symbol

An optional symbol that can be displayed in the item browser.

isDefault

Marks this option as default.

sortOrder

Sets the order in which the options are displayed in the selection UI components.

label

The label of the option as seen by the end user. Please note that you can localize the option labels later using the localization editor.

list

The objectID of the list to which this option belongs. It is not used during the import item.

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 the following properties match:

  • The name of the list

  • The repository type

  • The list type

  • The workspace, if applicable

  • The identifier of the parent list, if applicable

An option is considered to already exist if all the following properties match:

  • The label

  • The list to which it belongs

  • The parent option in cascaded lists

If you change the list name, a new list will be created during import.

If you change the label of an option and keep the list name, a new option will be added to the list.

If you check the “Delete subordinate items” option, any subordinate item of the list that is not included in the XML file will be removed from the original list during the import item.

If you check the “Overwrite existing” option, properties not used for identification will be overwritten during the import item. This way, you can change descriptions, symbols, and CSS, but not the name or label of a list or option.