Skip to main content

xSuite Interface Windows Prism 5.x – Online Help

Output Format "Text"

This output format generates a simple text file ("plain text") from the index data of the document. References to the file attachments can be included in the text file.

Deviating from the standard, the fields to be output are not defined via OutputFormat[].Fields[]. The text template to be configured describes the contents of the output file. To add fields, insert variables directly into the template using the syntax %{variable name}%. For index fields, the name corresponds to the name of the .Field[].Name property in the field catalog.

The additional specification of an output field definition is only required if a special formatting of its text representation is desired for a typed value. In this case, you only need to set the .Fields[].OutputFormat. The .Fields[].OutputName has no relevance here.

Property

Description

OutputFormat[].Line[]*

OutputFormat[].ItemLine[]

OutputFormat[].AttachFileLine[]

This configuration property is used to define the text template that describes the contents of the output file. The definition is done line by line (i.e., each array entry corresponds to one output line.)

.Line[] is the parent property and contains the primary lines. .ItemLine[] and .AttachFileLine[] represent child fragments, each representing only the lines for a single table item or file attachment if it is included in the output.

At runtime, these fragments are generated several times, if necessary, according to the number of table items / file attachments, combined into a block and inserted into the primary lines at a specified position. This insertion position is to be specified by the internal variables %ItemLine% or %AttachFileLine%.

In the lines of all three properties, variables for header data fields as well as general document, system, and environment variables can be used. Only in .ItemLine[] can the system variable %ItemNo% also be used for the running line number.

In .ItemLine[], variables for table fields can be used, and in .AttachFileLine[], file variables can be used. With explicit specification of a concrete line number, table fields can also be used in .Line[] and .AttachFileLine[].

As a general functional limitation, this output format does not support multiple tables of index data within a document; the maximum is one single table.

OutputFormat[].LineFeed(#)

Line-break characters used to separate the output lines defined

Default value: <# >0D0A </# > ("Carriage Return" and "Line Feed")

OutputFormat[].ItemLineSep(#)

OutputFormat[].AttachFileSep(#)

Specification of a delimiter (optional)

These delimiters are used to separate the multiple fragments generated via .ItemLine[] and .AttachFileLine[] .

By default, separation is performed with the line break defined in .LineFeed. To output the fragments all within one line instead, another delimiter can be defined (e.g., a comma).

OutputFormat[].Encoding

Character encoding of the text file to be created (see Miscellaneous)

Default value: Utf8

The following example shows an excerpt of the configuration for a document with 2 table rows and 2 file attachments, and the structure of the resulting text file.

{
   "OutputFormat": [
      {
         "Line": [
            "--- DOCUMENT ---"
            "Field 1: %Field1%",
            "--- ITEMS ---",
            "%ItemLine%",
            "--- ATTACHMENTS ---",
            "%AttachFileLine%"
         ],
         "ItemLine": [
            "(#%ItemNo%) Items Field 1: %Items.Field1%"
         ],
         "AttachFileLine": [
            "(#%FileNo%) Name: %FileName%"
         ]
      }
   ]
}

Structure of the text file generated:

--- DOCUMENT ---
Field 1: …
--- ITEMS ---
(#1) Items Field 1: …
(#2) Items Field 1: …
--- ATTACHMENTS ---
(#1) Name: …
(#2) Name: …