Skip to main content

xSuite Interface Windows Prism 5.x – Online Help

Field Catalog

The following properties are used to define field catalogs. A field catalog describes all the fields in a document that are relevant for processing.

Property

Description

FieldCatalog[].Name

Unique, freely selectable name of the field catalog

The name is used in the administrative database and logging. If the property value is missing, the catalog is given a default name with a serial number.

FieldCatalog[].IsDefault

Boolean value determining whether a field catalog will represent the default catalog

This property is relevant if a catalog is selected from multiple alternative catalogs in dependency to the conditions. The default catalog is read and the conditions of the alternative catalogs are evaluated based on the field contents of this default catalog.

A maximum of one field catalog may be declared as default. If no field catalog is declared as standard, the first, non-global catalog or the only catalog will implicitly be considered as the default catalog.

Default value: TRUE

FieldCatalog[].IsGlobal

Boolean value determining whether a field catalog will be declared as the global catalog

The fields of all global catalogs are added to the active field catalog. This function can be used, for example, if a certain set of fields in alternative field catalogs is identical in all field catalogs.

The default catalog can also be declared global. The fields of the default catalog are always used even if a condition is used to switch to an alternative catalog.

The order of the fields in the composite catalog, which may be relevant for the processing of initialization macros, depends on the order in which the fields were defined. The fields of the global catalogs are listed first in the order in which they were defined, followed by the fields of the normal field catalog.

Default value: TRUE

Notice

Avoid fields with the same name in the catalogs that are merged. This is particularly important if the properties of the fields with the same name have different values.

If name conflicts occur, fields in a normal catalog always take precedence over global fields (i.e., these fields are not overwritten by the global fields). If name conflicts occur within the global catalogs, only the first field with the same name will be adopted in the order of the catalog definitions.

FieldCatalog[].ConditionMacro

Field macro expression to select a specific field catalog from several alternatives depending on a condition (optional)

This expression must return a corresponding Boolean value. If no condition is specified, the condition will implicitly be considered fulfilled. In the order of their definition, the first alternative field catalog whose condition is fulfilled is used by default. The .MergeMultiple property can be used to select multiple alternative catalogs at the same time.

All catalogs that are not declared as default catalogs or global catalogs are used as potential alternative catalogs. Setting a condition is not relevant for global catalogs, as these catalogs are not taken into account when searching for alternatives. The fields of the global catalogs are always added to the found field catalog anyway.

FieldCatalog[].MergeMultiple

Normally, only the first valid alternative catalog is selected. If this property is activated for other catalogs, these catalogs are also selected. A common alternative catalog is created from the fields of all catalogs found. In the case of ambiguously named fields, only the first field with the same name is used in the order of the catalog definitions.

Normally, only the first valid alternative catalog is selected. If this property is activated for other catalogs, these catalogs are also selected. A common alternative catalog is created from the fields of all catalogs found. In the case of ambiguously named fields, only the first field with the same name is used in the order of the catalog definitions.

Default value: TRUE

FieldCatalog[].Field[].Name*

Unique technical name of a field in the field catalog

This name is used when mapping input fields and output fields, and as a variable name in macro expressions and dynamic configuration values.

You can select any name; however, there are restrictions regarding the use of letters, digits, underscore, and dot. The dot may only be used for tabular fields. The syntax is {TableName}.{ColumnName} (e.g., LineItems.ArticleText for the article description in an item line). All defined column fields that use the same table name are combined into a common table with this name. Accordingly, multiple tables can be created in parallel in a field catalog. However, most input systems and output systems do not support more than one table element. Furthermore, the subdivision of tables into further subtables (i.e., in the form TableName.SubtableName.ColumnName) does not currently apply in practice.

FieldCatalog[].Field[].InitType

Initial data type of the field value, if the field is initialized with an empty value

This property is also used when there are many input systems involved, with the purpose of converting an input value to a desired data type or to parse a textual input value as a specific data type.

The following data types are supported for field contents:

  • Text: string (default value)

  • Number: numeric value with or without decimal places

  • Date: date/time

  • Bool: Boolean value

An array cannot be explicitly set here, since this data type is only a container for values of the above types. Nevertheless, a field can be preset with an array that is either empty or already contains elements. You can use one of the two properties .InitValue or .InitMacro for this.

FieldCatalog[].Field[].InitValue

Initial value of a field

The initial value is used when: 1) a field catalog is assigned to a document, 2) a new item-data line is generated, but no value from the input data is assigned to the field, or 3) the input value is empty.

The configuration value is always a character string. Typed initial values must be specified in the syntax of a literal (see Constants). Text values must be placed in additional quotation marks, for example. If no explicit value is configured, a field will receive an empty initial value of the data type defined in the .InitType property.

FieldCatalog[].Field[].InitMacro

Field macro expression that is executed once for all fields of a document after all field values of the field catalog assigned to it have been initialized or read from the input data (optional)

Especially for field values that build on each other, it is important to note that the execution of the macros takes place in the order of the field definitions in the field catalog.

InitMacro is not applied to item data fields if these fields are added later using macro functions.

The purpose of this macro is to prepare content and validate field contents. In case of conditional selection of the field catalog, initialization and macro execution takes place for the fields of both catalogs (i.e. for the default catalog and for the determined alternative catalog).