Document numberRevision
DOCU122195

 

Export configuration

Export configurationBackgroundIntroductionFeaturesConfigurationAdd Export to basetypesAdd Export to subtypesBasic configurationConfigure <column> for visible columns in the Export viewConfigure columns for different item typesInherit columns from an existing <type> with the _inherit parameterConfigure default selection of files for individual item types based on file typesConfigure <output> for exportConfigure .html as output for exportConfigure .xlsx as output for exportConfigure header and footer for outputted HTML filesConfigure <static-file> to add custom files to your exportInclude static files with specific document revisionsConfigure <export> properties<export> elementDefault Export ProfileSecuritySpecify where an export profile can be accessed fromSpecify which users can make use of an export profileAdvanced customizationOverwrite the default profileUsing runtime variables in Export profilesPhysical columns as runtime variablesVirtual columns as runtime variables

Background

This article introduces you to the setup and configuration capabilities of Export in Highstage.

 

Introduction

Export is is bundled with Highstage and is, by default, available on all items by navigating to Options > Advanced > Export (export documentation) from an item view:

export-location

NOTE: Export requires one of the following user levels to be accessible: AdvancedUSer SuperUser AdminRead AdminWrite.

 

Export is a reworked feature (Implemented in version 7 of Highstage) which replaces a prior Export functionality. This Export feature provides more customization and allows for advanced configuration of export profiles, supporting a wide range of readily available settings for exporting specific items, structures, data columns, and files to various formats:

export-example

 

By default, Highstage comes with a preexisting Export Profile (Default). You can overwrite the default export profile and add more to the list, for easy availability of profiles for the users:

export-profiles

 

Features

Export supports the following capabilities:

 

Configuration

Export can be configured in a number of ways to facilitate a large number of different export profiles.

 

Add Export to basetypes

By adding an export profile to a specific basetype, that export profile becomes available exclusively from items of that type.

To include Export to basetypes in your Highstage installation, add the appropriate code in the custom.schema.xml.

The custom schema can be accessed by navigating to ./TS_WebApp/tweak/custom.schema.xml.

 

For instance, here we add a new export profile to the basetype ts_item:

 

Export can also be added to other basetypes such as Documents, Actions or Devices by changing the <type name="BASETYPE"> attribute to reflect the appropriate basetype.

The following sample illustrates a number of different available basetypes where Export can be added:

 

Add Export to subtypes

By adding an export profile to a specific subtype, that export profile becomes available exclusively from items of that subtype.

To include Export to subtypes in your Highstage installation, add the following snippet to the appropriate subtype schema:

Here you can modify the type name="SUBTYPE" to specify which subtype you want the Export profile to be available from.

 

Basic configuration

The basic configuration of Export can be seen in the following snippet:

Here, we have provided the following settings:

The Custom Export Profile is now available from all items in Highstage, and available for export for the author of the item where the Export functionality was accessed:

export-profiles

 

From this basic configuration, you can add a large number of different elements and attributes to further customize your export profile. For instance, notice that only the Item and File list column is visible.

In the following section, you will be introduced to the configuration of adding additional columns to your export profile.

 

Configure <column> for visible columns in the Export view

You can configure which data columns (item properties) you want to be visible in the grid by including a <type> element with associated <column> elements inside the <export> element.

The following snippet illustrates a select number of item columns associated with the documents in the list to be displayed:

Notice that each <column> must include a name and title parameter. The title parameter will be used as a column header. The name parameter is used for column identification.

 

The following columns are now displayed for documents (doc) alongside the default item and File List columns:

export-with-columns

 

Configure columns for different item types

You can also configure whether you want different or more columns for other item types in the list.

In the following snippet, we have included a second <type> element for parts where we want to list the existing columns from doc, but also add a UseStatus column for parts:

 

This UseStatus column are now displayed for parts, in addition to the existing document columns:

export-with-usestatus

 

Inherit columns from an existing <type> with the _inherit parameter

If you want to display the same columns for different item types in your export, you don't have to copy those same columns for each new <type> that you add to your configuration.

In the following snippet, we make use of the parameter _inherit="doc" so that we reuse the existing columns from Documents (doc) and add those to Parts (part):

 

Configure default selection of files for individual item types based on file types

For each item type (<type>) that you define in your export profile, you can add a pattern property to define which files (based on file type) that should be selected by default when accessing the export profile.

For instance, the following snippet ensures that only Word (.docx) files are selected by default for Documents (doc) type items and Excel (.xlsx) files are selected by default for Parts (part) type items:

You can add any number of file-types to a single pattern property by separating them using ;.

You can always manually select other files in the file list. The pattern property only defines what is selected by default when accessing the export profile.

 

Configure <output> for export

By default, the output of the export is the selected files from the File List column.

You can configure which files should be generated on export in addition to the selected files from the File List, by defining one or more <output> elements within the <export> element.

You can configure which data columns (item properties) to be exported to the file by including associated <column> elements inside the <output> element.

The following output file types are currently available for export:

It is possible to add one more more <output> elements into the <export> to allow for the generation of additional files with different item property columns.

 

Configure .html as output for export

Continuing with our Custom Export Profile example, the following snippet illustrates the declaration of an <output> element which in turn outputs an .HTML file titled EXPORT, as an addition to the selected files from the File List:

 

On Export, this will generate the file EXPORT.HTML, containing a number of associated property columns in addition to the folder with the selected files from the File List column:

export-html-sample

Tip!

Notice that the columns of the output is different from the columns that are displayed in the list prior to export. This makes it easy to differentiate between item properties that should only be displayed before export for Highstage users, and the actual properties that are exported for potential external use.

 

 

Configure .xlsx as output for export

The following snippet illustrates the declaration of an <output> element which outputs a .xlsx file titled Exported xlsx.xlsx with a number of associated data columns:

 

From the snippet, the following Excel file is generated with a Report tab that includes all the listed columns:

xlsx-primary

 

You can add any number of additional tabs (Worksheets) in an Excel output, but adding a worksheet to your xlsx output.

For instance, the following worksheet adds an additional tab titled Secondary which displays the items associated with the url property:

The following tab in the Excel (.xlsx) file is generated:

xlsx-secondary

Any search URL can be inserted into the url property in the <worksheet> element, to add any list of items to a new tab in the Excel sheet.

For instance, the following URL property url="/ts/search.aspx?&amp;t=doc&amp;status=%3D"Working"" only retrieves documents in Working state.

 

IMPORTANT!: If there are any occurring & characters in the copied URL, ensure that you replace all occurrences with &amp;.

For instance, the URL ts/search.aspx?&t=doc&itemtype=DOCU must be changed to ts/search.aspx?&t=doc&amp;itemtype=DOCU to avoid errors in Highstage.

 

Configure header and footer for outputted HTML files

For the outputted .html files, you can customize the header and footer element.

To to so, you can use an <xhtml> element within the <output> element, with the name value set to header or footer.

Within the <xhtml> element, you input character data (CDATA) . This allows for you to insert basic HTML to your header/footer elements.

The following sample adds both header and a footer to an outputted HTML file:

 

The following .HTML output file are then exported:

header-footer-example

Tip! You can include item properties as well as HTML elements within the CDATA element: <![CDATA[ ]]> to further customize your document headers and footers. In our example, we used @[data:item] to make use of the item ID.

 

Configure <static-file> to add custom files to your export

Export outputs a tree-view of items and associated files and columns for export from a parent item. Should you wish to append additional items and documents to the export outside of this 'tree' of items, you can use the <static-file element.

This element allows for you to define one or more 'external' items and associated files to be available in your export. This can, for instance, be documents that explains the purpose of the various columns and files for external stakeholders.

Adding the following snippet within the <export> element includes all .docx files from the item with ID DOCU11270-1A:

 

The .docx files from item DOCU11270-1Aare now added to the export:

static-file-sample

You can include any number of \<static-file> elements to an export profile.

 

<static-file> properties description:

PropertyDescriptionExamplesRequired
nameUnique name declaration of the <static-file> element.name="ExportGuide"✔️
objThe ID of the item containing files to be included for export(Example) Item with specific revision:
obj="DOCU11270-1A"

(Example) Item without revision:
obj="DOCU11270".
✔️
objtypeSpecifies the basetype (action / doc / part / device) of the item.objtype="doc"✔️
patternDetermines which files are available for export as static files.

The files that are not explicitly declared in the pattern property are omitted from the file list completely, and therefore unavailable for export
Make all files associated with the item available for export:
pattern="*"

Make all .PDF files available for export:
pattern="*.pdf"

Make all .xlsx files available for export:
export=*.xlsx"

Make a specific file available for export:
pattern="document.docx"
✔️
filterDetermine which version of items and documents to be added as static files for export based on existing filters.

(Remember to remove the revision from the obj property. Referring to a specific revision of an item in the obj property whilst setting a filter to another version will give an error.)
(Example) Use the latest approved version of a document as a static file:
filter="latestapproved"

(Example) Use the latest version of a document:
filter="latest"
 

 

Include static files with specific document revisions

If you want, you can include static files based on a filter to select a specific revision of files to be included.

As another example, the following snippet illustrates the use of a filter, to ensure that we use the latest approved version of the .docx document as a static file for export:

notice that we have removed the version from the obj property and added the property filter="latestapproved". Any revision filter such as latest, latestapproved or latestinworking can be used.

 

 

Configure <export> properties

We have explored the configuration capabilities of the <column> elements for displaying item columns in the Export view, and the configuration capabilities of the <output> element for exporting selected files and item properties as .html and .xlsx files.

Similarly, a number of properties can be added to an <export> element to define:

These settings can be different for each defined export profile.

 

The following snippet illustrates examples of use of all available parameters for the <export> element:

 

 

A detailed description of the available attributes and supported values for <export> elements can be found in the <export> element chapter.

 

<export> element

The following list provides a thorough overview of the functionality associated with the attributes and elements of the <export> element.

Attributes:

PropertyDescriptionExampleRequired
nameUnique name of the export profile. Will be used at the title for the export profile(Example) name="Assembly"✔️
trustees-extendedDefine trustees (any number of vector roles) to be able to access, modify and export selection.(Example #1) Sets author as required permission for using export profile: truestees-extended="activeresource1" (Example #2) Sets any user to be able to use the export profile: trustees-extended="user"✔️
trustees-expressDefine trustees (any number of vector roles) to be able to access and export selection. These trustees do not have access to the item/file list selection and can only export the default selection of items and files as a 'quick export'.(Example #1) Sets team members to able to make an 'express' export for this export profile: trustees-express="teammember"
deepEnable or disable whether children (referenced items of the parent items) is available for export.Disabled: deep="0" Enabled: deep="1"
includeTypesSpecify explicitly which item of types (basetypes and/or subtypes) is available for export. All other item types are omitted from the list and makes items with those types unavailable for export. If a parent item is unavailable, so are the child itemsDefault: Make all documents, parts and actions available for export: includeTypes="*" (Example #1) Make ASM and GD item types available for export: includeTypes="ASM;GD" (Example #2) Make all documents (doc) and parts (part) available for export: includeTypes="doc;part"
excludeTypesSpecify which item of type (basetypes and/or subtypes) is explicitly unavailable for export.(Example #1) Items of type *GD* and *PRD* is omitted from the export list completely, and cannot be exported: excludeTypes="GD;PRD"
file-patternSelecting the associated export profile will select all files with the declared file-pattern file type(s) for export. Files that are not of the specified type(s) will be deselected by default, but can be manually selected.(Example) Selects all .txt files for export: file-pattern="*.txt" (Example) Selects all .xlsx and .csv files for export: file-pattern="*.xlsx;*.csv" (Example) Selects a specific file for export: file-pattern="example.txt"
package-nameName of the exported folder (Item properties can be included in the folder name using @[data:xx] )(Example #1) Example using the export parent item ID and export date: package name="@[data:item] - Export (@[date])"
selection-modeSpecifies the item(s) and file(s) select/deselect behavior. (By default, selecting files will always select the associated item for export)selection-mode="0":
Select items and files individually for export.

selection-mode="1":
Selecting/deselecting parent items will also select/deselect child items and associated files. Selecting child items will also select the parent item for export.

selection-mode="2": Selecting/deselecting a parent item will also include/exclude all child elements and associated files for export (files are affected).

selection-mode="3":
Selecting a child item will also select parent items for export (files are not affected).
load-settingsEnables or disables whether the saved settings is loaded by default when accessing the export profile.Enable: load-settings="1"

Disable (): load-settings="0"
expanded-levelsSpecifies the default number of expanded columns when loading an export profile.(Example):
expanded-levels="2" loads the first two 'levels' in the item hierarchy of an export.

 

Elements:

NameDescriptionRequired
<type>Defines item type (ex. ts_item/doc/part/device) and visible data columns (<column>) for the items to be listed in the export grid view.✔️
<output>Defines the output file format, file name, and associated data columns to be exported.
<static-file>Include any number of files to be included for export.

 

Default Export Profile

The following default profile is available as a standard for export in Highstage:

 

Tip!

You can make any changes to the Default profile by creating your own export profile in your custom.schema.xml and setting the name parameter of the <output> element as default:

This replaces the existing elements and attributes with your changes.

 

 

Security

There are three distinct aspects to the accessibility and security of using export:

  1. The type element surrounding an <export> determines from which item type(s) that an export profile can be accessed from.
  2. The trustees-extended attribute of an <export> element determines which users who explicitly can use an export profile.
  3. Standard Highstage security is enforced. Even if a user has access to an export profile - only items and files that are already available to that user are listed for export. Items and files that a user does not have access to are omitted from the export list altogether.

 

Specify where an export profile can be accessed from

An <export> element must be placed within a \<type> element. Thus, declaring a specific type will ensure that an export profile will be available only when accessing an item of that type.

An export profile available for all items:

An export only available from Documents:

An export only available for Parts:

 

Specify which users can make use of an export profile

The trustees-extended attribute from the <export> element determines which users, in general, who has access to an export profile. All available vector roles can be used as values to determine security.

Example where any user running as AdvancedUser has access to an export profile:

you can read about the trustees-extended attribute here.

 

Advanced customization

Overwrite the default profile

If you want complete control of the Default profile, and build it from scratch, you can use the parameter _overwrite="1" to ensure that nothing from the bundled profile is used:

This requires that you set up the various elements and parameters for Export to function as all existing elements and attributes are removed.

 

Using runtime variables in Export profiles

Physical columns as runtime variables

You can make use of runtime variables throughout Export profiles to dynamically refer to column contents in the following manner:

Note: Replace COLUMNNAME with the name of the appropriate column.

 

Example:

 

Virtual columns as runtime variables

Within the scope of the <export> element, you must declare any runtime variable which refers specifically to virtual columns, in the following manner:

Note: Replace COLUMNNAME with the name of the appropriate virtual column.

 

Example:

 


highstage_footer