<< Click to Display Table of Contents >> Concatenate Documents From XPath |
Overview
This section describes how to use the feature to concatenate documents from an XPath.
Example
In the following sample process, assume we have a process entity called OfficeSupplyRequest.
Such process uses the following data model:
The Quotation Request attribute allows users to upload several files, we want the attribute Request Summary to have all the documents uploaded. To do so we will use the Concatenate documents from XPath file 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.ConcatDocumentsFromXpathFileToWord(Me, fileXpath)
The main parameters of this function are:
•The first parameter (Me) is fixed.
•The fileXpath: the XPath to the uploaded documents 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.ConcatDocumentsFromXpathFileToWord(Me,"OfficeSupplyRequest.QuotationRequest");
var File = Me.newCollectionItem("OfficeSupplyRequest.RequestSummary");
File.setXPath("FileName", "QuotationRequests_" + Me.Case.Id + ".docx");
File.setXPath("Data", file);
The resulting file will have as name QuotationRequests_[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.ConcatDocumentsFromXpathFileToPdf(Me, fileXpath)
The main parameters of this function are:
•The first parameter (Me) is fixed.
•The fileXpath: the XPath to the uploaded documents 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.ConcatDocumentsFromXpathFileToPdf(Me,"OfficeSupplyRequest.QuotationRequest");
var File = Me.newCollectionItem("OfficeSupplyRequest.RequestSummary");
File.setXPath("FileName", "QuotationRequests_" + Me.Case.Id + ".pdf");
File.setXPath("Data", file);
The resulting file will have as name QuotationRequests_[CaseNumber].pdf.
Please make sure the file extension matches the document type the method uses. |
Last Updated 1/6/2022 4:16:39 PM