cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Creating a pdf from a button click with form input

Jump to solution

Hi all,

I've built a form with a repeating section. The repeating section has numerous data fields that users fill out with information about nonconforming products. This will include things such as product lot numbers, a unique identifier to look up the incident, and identifying information about the nonconforming products (i.e., the nature of the non-conformance, the quantity which is non-conforming, etc.). 

My users have requested for me to build a way for them to generate a short PDF report based upon the information they have input; however, they don't need all of the info from the repeating section.

I had hoped to be able to do this using jsPDF. However, I'm finding it less malleable than I would like for my needs. I was wondering if anyone had any suggestions. 

The main issue I've been running into with jsPDF is that there doesn't seem to be a way to store the user input data from the repeating section as a Javascript variable to be sent to jsPDF to generate a new document. My attempts to do this have resulted in errors stating that a string or array is required, and the value of the input cannot be stored due to being  undefined. 

Any help would be appreciated! I've been lurking for a while and gotten a lot of amazing tips from here. The community is truly fantastic. 

Tags (2)
0 Kudos
Reply
2 Replies
Workflow Hero

Re: Creating a pdf from a button click with form input

Jump to solution

Hi there Brandon!

You can do this with the Document Generation action.  It will intelligently build tables or rows for you based on the amount of data in your collections / repeating section. If you're in O365, it's already there - if you're On Prem, some assembly is required:  

Using Document Generation is pretty easy. You can have multiple templates and use conditions to choose which one. The variables / items / tables are built into Word as an App Add-On and show up in a panel on the right. Getting your first table done is always a bit tricky, but happy to help with that.

Cheers,

Rhia

0 Kudos
Reply
Workflow Hero

Re: Creating a pdf from a button click with form input

Jump to solution

Thanks for the reply Rhia!! 

I'll need to get in touch with the IT group on site to see what's involved with setting this up. I wasn't aware this feature existed. That's fantastic. 

Reply