ProcessReadIndex[].BreakDownSubItems | The UBL specification offers the option of defining sub-items for item data across multiple levels. However, the output systems addressed by xSuite Interface only support flat tables. For this reason, input-side support for processing nested table constructs has not yet been implemented. By default, only the items at the top level are read. If the value of this configuration property is true, the item data is broken down to the lowest level (default value: false). A flat table is created that consists only of the items at the lowest level. This can result in a loss of information if, for example, data fields are only set at the higher levels. To a limited extent, the data is automatically aggregated across all item data levels. The following logic is used for this purpose: NoticeThis logic is only applied to elements that are directly below an item data element (InvoiceLine or SubInvoiceLine). The logic is not applied to deeper nested sub-elements. List elements, i.e., those that may be included multiple times according to the specification, are combined across all levels into a complete list, which is then assigned to the broken-down item of the lowest level. For all other elements, starting from the broken-down items at the lowest level, empty or non-existent values are searched for in the respective higher-level item data element until a value is found. This value is assigned to the item at the lowest level. If the value is set at several levels at the same time, at least the value of the lowest level at which the value was found is retained. Elements of the types "Price" and "Amount" are excluded from this logic. These elements usually represent a total value across the subordinate items in higher-level items.
|
ProcessReadIndex[].ReadValuesTree | Boolean value determining whether values are read in as a tree structure (default value: false). When this property is enabled, it overrides the .ReadMultiValues property. .ReadMultiValues reads multiple values that are to be transferred to a single target field as a flat array. .ReadValuesTree, on the other hand, generates hierarchically nested arrays that reflect the structure in which the values are arranged in the XML document if, according to the UBL specification, multiple nodes are permitted on several levels of the XML path. The .ReadValuesTree property only takes effect if no XPath expression is used under .InputName to define the node to be read. The program functions for selecting nodes via XPath only return single values or flat value lists. Example: <Invoice>
<AdditionalDocumentReference>
<DocumentType>DocType1</DocumentType>
</AdditionalDocumentReference>
<AdditionalDocumentReference>
<DocumentType>DocType2a</DocumentType>
<DocumentType>DocType2b</DocumentType>
</AdditionalDocumentReference>
<AdditionalDocumentReference>
</AdditionalDocumentReference>
</Invoice>
In this example, AdditionalDocumentReference and DocumentType are multiple XML nodes. Reading the document types yields the following result: [["DocType1"], ["DocType2a", "DocType2b"], []] For each level where multiple nodes are allowed, an array is generated. This happens regardless of the number and presence of values. However, levels where only single nodes are allowed are not displayed in the return structure. If the path consists exclusively of single nodes, no array is generated. Instead, the value is returned directly. This property differs from the .ReadMultiValues property, which reads no value, a single value, or an array of values depending on the content of the document. This approach may require case differentiation in further processing. .ReadValuesTree, on the other hand, always returns a predictable result (a single value, an array, or a nested array) for a specific path, regardless of the content. When reading table fields, a distinction is always made between item data (InvoiceLine and CreditNoteLine nodes) and other nodes that may occur multiple times in the document, regardless of .ReadValuesTree. For item data, the values are read separately for each existing item data node. This allows the values to be clearly assigned to the relevant item. If the .ReadValuesTree property is enabled, the values read for each item can be displayed in an array structure. In contrast, for other table data, the entire document is first read and the result is then separated into its elements at the top array level, each of which is assigned to a table row. |