Extraction of Internal System Values
BatchExists()
This function checks if the batch that is currently being processed already exists. The check takes place based on the scenario and the external ID of the batch. The return value is either an array of the internal IDs of existing batches or an empty array.
Notice
This function is primarily used for duplicate checking via the property Input.CheckDuplicateMacro of the input step.
Parameter | Data Type | Description |
|---|---|---|
1 | Text | Specification of a user-defined query against the "Batches" table (optional) The query must be formulated syntactically in the internal macro syntax. The syntax is converted internally in the program into the appropriate database syntax. Example of a query that is equivalent to the standard query: (@ExternalId == '%BatchExtId%') && (@OriginalScenario == '%DocScenario%') |
FileCount()
This function determines the number of file attachments in the current document that correspond to a specific name filter.
Return type: number
Parameter | Data Type | Description |
|---|---|---|
1 | Text | Name filter for the file attachments to be counted Default value: |
2 | Text | Restriction of the search to file attachments of a certain type (default value: all attachments) (optional):
|
Examples
FileCount("*.pdf", "Original") returns the number of original files of type "PDF".
GetDocExtKey(), GetDocMetaData()
These functions read an external key (from ExternalKeys property) or a metadatum (from the property MetaData) of the current document.
Return type: text
Parameter | Data Type | Description |
|---|---|---|
1* | Text | Name of the key or metadatum to be read |
Examples
GetDocExtKey("SapRecordNo") returns the key value of the SAP record number.
GetDocProperty()
This function reads an internal property of the current document.
The return type varies.
Parameter | Data Type | Description |
|---|---|---|
1* | Text | Name of the property to be read:
|
Examples
GetDocProperty("Number") returns the serial number in the document, e.g. 1.
GetFileExtKey(), GetFilesExtKey(), GetFileMetaData(), GetFilesMetaData()
These functions read an external key or a metadatum of file attachments that match a certain name pattern – either the first one found, or all of them.
Return type: text
For "GetFilesExtKey()" and "GetFilesMetaData()", i.e. when including all found attachments, the multiple values are returned as an array.
Parameter | Data Type | Description |
|---|---|---|
1 | Text | Name filter for the file attachments to be taken into account Default value: |
2 | Text | Restriction of the search to file attachments of a certain type (default value: all attachments) (optional):
|
3* | Text | Name of the key or metadatum to be read |
Examples
GetFileMetaData("*.pdf", , "MetaTest") returns the value of the MetaTest metadata of the first PDF file attachment found across all (original and converted) attachments, (e.g., "Value1").
GetFilesMetaData("*.pdf", , "MetaTest") returns the values of the MetaTest metadata of all PDF file attachments found (e.g., ["Value1", "Value2"]).
GetFileProperty(), GetFilesProperty()
These functions read an external key or a piece of metadata of file attachments that match a certain name pattern – either the first one found, or all of them.
The return type varies.
For GetFilesExtKey() (i.e., when including all found attachments) the multiple values are returned as an array.
Parameter | Data Type | Description |
|---|---|---|
1 | Text | Name filter for the file attachments to be taken into account Default value: |
2 | Text | Restriction of the search to file attachments of a certain type (default value: all attachments) (optional):
|
3* | Text | Name of the property to be read:
|
Examples
GetFileProperty("*.PDF", "Processed", "Size") returns the size of the first converted PDF file attachment (e.g., 32768).
GetFilesProperty("*.PDF", "Processed", "Size") returns the sizes of all converted PDF file attachments (e.g., [32768, 65536]).