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!


Reply