IMPORT

Use the IMPORT script function to import objects or folder structures from an XML file.

When you import the content, a new folder ##INCLUDED_EXTERNALS## is created on the same level as the dedicated folder on the target system. Linked objects are stored in the ##INCLUDED_EXTERNALS## folder.

The default size of the XML file is 1024 KB, with a maximum file size of 30720 KB. Administrators can specify a different MAX_IMPORT_SIZE limit. For more information, see UC_SYSTEM_SETTINGS - Systemwide Settings.

Notes:

Important!

Syntax

IMPORT (File [,[Folder], [Object Setting] [,Link Setting]] )

Parameters


Return Codes

Tip: Use the :ON_ERROR script statement to define action to take if the import fails. For more information, see Script Elements for Error Handling.

Examples

The following example skips objects that already exist in the import process. The script uses a script variable to pass the file and folder name to the IMPORT function.

:SET &FILE#  = "\\PCUC4\UC4global\IMPORT\uc4_import.xml"
:
SET &FOLDER# = "IMPORT/JOBS"
:
SET &RET#    = IMPORT(&FILE#,&FOLDER#,"0")

(UNIX) The following example imports a folder structure:

:SET &FILE#  = "/opt/UC4/import/uc4_import.xml"
:
SET &FOLDER# = "IMPORT/JOBS"
:
SET &RET#    = IMPORT(&FILE#,&FOLDER#,"0")

See also:

seealso

Importing/Exporting Objects