Data
Purpose and use
This document function can be used to transfer properties via the
primedocs Connect interface (Structure ) by defining a schema using this function.
Basic structure
<DataConfiguration>
<Schema>
<Text Id="MyTestValue" />
<Object Id="TestObject">
<Schema>
<Text Id="TestValueInTestObject" />
</Schema>
</Object>
<ObjectCollection Id="TestObjectCollection">
<Schema>
<Text Id="TestValueInTestObjectCollection" />
</Schema>
</ObjectCollection>
</Schema>
<!-- Optional:
<GlobalSchema Key="GlobalKey" />
-->
</DataConfiguration>
Schema / GlobalSchema
This function uses the schema element to define which data can be transmitted via the interface.
The elements defined here can then be stored in the respective template. The schema can also be stored at Global Configurations via <GlobalSchema Key="..." />.
The Schema or GlobalSchema can then define these types:
Text
Texts can be received via the Text-element.
| Attribute name | Description |
|---|---|
Id (required) | Is required for identification. Must not contain spaces and must be unique. |
FormattedText
The FormattedText-element can be used to receive text with simple formatting options.
| Attribute name | Description |
|---|---|
Id (required) | Is required for identification. Must not contain spaces and must be unique. |
The data can be transmitted in various formats (Html or HtmlBase64).
WordContent
The WordContent-element can be used to receive texts with Word-specific formatting options.
| Attribute name | Description |
|---|---|
Id (required) | Is required for identification. Must not contain spaces and must be unique. |
The data can be transmitted in various formats (DocxBase64, FlatOpc or FlatOpcBase64).
Object
If you want to group several elements, an element of the Object type is suitable. Below the Object you can place Text, FormattedText or WordContent elements as well as further Object and ObjectCollection elements — objects can therefore be nested to any depth.
| Attribute name | Description |
|---|---|
Id (required) | Is required for identification. Must not contain spaces and must be unique. |
Required (optional) | If true: The object must be transmitted.:::note > Objects configured with Required="true" can be used directly as fields in the template. |
If an Object with Required="true" is not transmitted, this is considered an error and document generation is aborted.
ObjectCollection
Whereas an Object represents a single data record, an ObjectCollection receives several records of the same kind — that is, a list, e.g. invoice line items or participants. It can contain Text, FormattedText or WordContent elements as well as further nested Object and ObjectCollection elements; these define the fields that each entry of the list has.
| Attribute name | Description |
|---|---|
Id (required) | Is required for identification. Must not contain spaces and must be unique. |