Integration Server 10.7 | Built-In Services Reference Guide | Document Folder | Summary of Elements in this Folder | pub.document:documentToDocumentList
 
pub.document:documentToDocumentList
WmPublic. Expands the contents of a document into a list of documents.
Each key/value pair in the source document is transformed to a single document containing two keys (whose names you specify). These two keys will contain the key name and value of the original pair.
Input Parameters
document
Document Document (IData object) to transform.
name
String Name to assign to the key that will receive the key name from the original key/value pair. (In the example above, this parameter was set to pName.)
value
String Name to assign to the key that will receive the value from the original key/value pair. (In the example above, this parameter was set to pValue.)
Output Parameters
documentList
Document List List containing a document for each key/value pair in the document parameter. Each document in the list will contain two keys, whose names were specified by the name and value parameters. The values of these two keys will be the name and value (respectively) of the original pair.
Usage Notes
The following example shows how a document containing three keys would be converted to a document list containing three documents. In this example, the names pName and pValue are specified as names for the two new keys in the document list.
A document containing these three keys:
Key
Value
cx_timeout
1000
cx_max
2500
cx_min
10
Would be converted to a document list containing these three documents:
Key
Value
pName
cx_timeout
pValue
1000
Key
Value
pName
cx_max
pValue
2500
Key
Value
pName
cx_min
pValue
10