JonMiller724
Canvas Initiate

Doc Gen File Attachments

Jump to solution

I have a Nintex Workflow Cloud form that generates a PDF.  This form allows users to upload multiple pictures.  I am looking for a way to embedded the pictures into the PDF that is generated.  

 

Does anyone have a solution for this?

0 Kudos
Reply
5 Replies
butlerj
Community Manager Community Manager
Community Manager

Re: Doc Gen File Attachments

Jump to solution

@JonMiller724 as you probably know, the File Attachment control in NWC forms stores the content as a collection of references to where the files are stored in our blog storage:

Screen Shot 2020-06-11 at 7.35.15 AM.png

 

You can actually access and use these files in your DocGen action by using the Collection Operations actions. For example, in my workflow I used the Get Item from Collection with an index of 0 and stored the value in a File variable:

Screen Shot 2020-06-11 at 7.36.42 AM.png

 

And then could use that Image file variable within my Document Generation action:

Screen Shot 2020-06-11 at 7.37.34 AM.png

 

Hope that helps!

View solution in original post

0 Kudos
Reply
fish
Design Dabbler

Re: Doc Gen File Attachments

Jump to solution

@butlerj Question, does this solution work for multiple images?

 

I have tried the solution, but I am only to get one file to show up in the document generator. Any advice on how to resolve?

 

Any help would be greatly appreciated!

Thanks

0 Kudos
Reply
butlerj
Community Manager Community Manager
Community Manager

Re: Doc Gen File Attachments

Jump to solution

@fish the only way that I can think of for this is to use multiple images you will need to pre-define a couple different variables and then loop through the collection from the start form to assign each attachment to the new file variables. This is a little cumbersome as we don't yet have row replication for collections in the NWC DocGen action. 

 

@leighburke can you think of any other way to do this?

0 Kudos
Reply
leighburke
Nintex Employee
Nintex Employee

Re: Doc Gen File Attachments

Jump to solution

@butlerj @fish I have an example that will deal with multiple files, you can find an explanation and export key here(https://community.nintex.com/t5/Nintex-Workflow-Cloud/How-to-merge-files-in-NWC-workflow-from-Form-a...). This is written for templates but the run if logic will work for images.

Reply
fish
Design Dabbler

Re: Doc Gen File Attachments

Jump to solution

@leighburke Thank you very much, it is working now. I appreciate it!

0 Kudos
Reply