Skip to main content

Hi all,

I have spent hours trying to use “combine documents” workflow step without any success.

The scenario:

Document generation triggers the workflow.

Document generation form contains attachment field. The user can add multiple attachments. I would like to combine atached documents with the main generated letter to make it as one file (.docx).

Looking into variables of the worflow connected to doc gen I can see all my document data points/fields and the main document (generated) ID in the path:

Params.Params.Documents.Document.Id

 

and the attachments ID in the paths: 

Params.Params.TemplateFieldData.Attachments_Attachments.Attachments_SingleValue.X.Document.Uid

 

where X is the number of the attachment starting from 0.

Searching community I have found the theread: 

and going after I have created variable (named Combined_doc_holder) and trying to update this variable using “update variable” step with the expression:

GetVariableValue("Params.Params.Documents.Document.Id")+"|"+GetVariableValue("Params.Params.TemplateFieldData.Attachments_Attachments.Attachments_SingleValue.0.Document.Uid")

In general if the created variable (Combined_doc_holder) is “ID_list” type I am receiving the error: 

Failed to execute expression: Expression must evaluate to a node-set.

I have tried many combination of the varaible types and expresions - nothing works fine. I am not able to assign the right value to the variable using expression. It may happen I address it wrongly. As a result I get mentioned error or my variable is not updated due to not described error (I get only reference number of the error).

Anybody can guide me little bit?

Hello @Tomasz Szostek 

Welcome to the DocuSign Community!

First of all, you should add the page break at the end of the main template. Second, save both the document Uid in variable and then write the C# code using those variables.

If you see any error then, try to separate both the Id’s with (“,”) this in C# code not with the pipe symbol “|”.

I think this will resolve your issue. Keep on radar if you need any help.

Thanks!

 


Hello @Tomasz Szostek 

Welcome to the DocuSign Community!

First of all, you should add the page break at the end of the main template. Second, save both the document Uid in variable and then write the C# code using those variables.

If you see any error then, try to separate both the Id’s with (“,”) this in C# code not with the pipe symbol “|”.

I think this will resolve your issue. Keep on radar if you need any help.

Thanks!

 

Hi Pawan,

 

that is great - works fine.

THANK YOU!


Hello ​@Tomasz Szostek and ​@Pawan Gangwani ,

I am running into similar issue.

Situation - I have created a form which is tied to underlying template. I am using a configuration to generate the document based off of form and then launching the workflow.

Workflow is configured to run at Document generation configuration. However, I do not see Documents.Document.Id variable for the main generated document but am only able to see the fields in the form, i.e., Params.Params.TemplateFieldData.Attachments_Attachments.Attachments_SingleValue.0.Document.Uid".
However, if I change workflow config to trigger based off Document then I do not see form fields. 
Not sure where I am going wrong.

But I am unable to assign document IDs of both main and attached documents in one workflow and unable to generate a combined document.

Also, in case a user has uploaded multiple files, how would we capture document ID for each as template only shows 1 variable.

Any help would be highly appreciated.


Reply