|
<< Click to Display Table of Contents >> Concatenate Documents From Two Xpaths |
Overview
This section describes how to use the feature to concatenate documents from two different Xpaths.
Example
In the following sample process, assume we have a process entity called OfficeSupplyRequest.
Such process uses the following data model:

We want the attribute Request Summary to have the information uploaded into Quotation Request and Invoice attributes. To do so we will use the Concatenate documents from two Xpaths method.
|
The documents to concatenate should be the same format, either PDF or Microsoft Word document. Otherwise, the method will not work correctly. |
In this case the syntax of the function is:
CHelper.ConcatDocumentsFromTwoXpathsToWord(Me, fileXpath1, fileXpath2)
The main parameters of this function are:
•The first parameter (Me) is fixed.
•The fileXpath1: the XPath to the first document as a string.
•The fileXpath2: the XPath to the second document as a string.
To concatenate the files of our example we will need an expression box:

The expression above is as follows:
var file = CHelper.ConcatDocumentsFromTwoXpathsToWord(Me,"OfficeSupplyRequest.QuotationRequest","OfficeSupplyRequest.Invoice");
var File = Me.newCollectionItem("OfficeSupplyRequest.RequestSummary");
File.setXPath("FileName", "RequestSummary_" + Me.Case.Id + ".docx");
File.setXPath("Data", file);
The resulting file will have as name RequestSummary_[CaseNumber].docx.
|
Please make sure the file extension matches the document type the method uses. |
In this case the syntax of the function is:
CHelper.ConcatDocumentsFromTwoXpathsToPdf(Me, fileXpath1, fileXpath2)
The main parameters of this function are:
•The first parameter (Me) is fixed.
•The fileXpath1: the XPath to the first document as a string.
•The fileXpath2: the XPath to the second document as a string.
To concatenate the files of our example we will need an expression box:

The expression above is as follows:
var file = CHelper.ConcatDocumentsFromTwoXpathsToPdf(Me,"OfficeSupplyRequest.QuotationRequest","OfficeSupplyRequest.Invoice");
var File = Me.newCollectionItem("OfficeSupplyRequest.RequestSummary");
File.setXPath("FileName", "RequestSummary_" + Me.Case.Id + ".pdf");
File.setXPath("Data", file);
The resulting file will have as name RequestSummary_[CaseNumber].pdf.
|
Please make sure the file extension matches the document type the method uses. |
Last Updated 1/6/2022 4:16:35 PM