This walk-through and workflow demonstrates how you can dynamically generate an HTML document using Nintex Workflow.
An interesting scenario I ran into is one where a user wanted to create a form document quickly and easily (without having to call IT or leverage an outside solution or functionality such as InfoPath, Word Automation Services, etc.) that had dynamic text data from a SharePoint list.
This sounded like something that could be accomplished with some very basic HTML (full disclosure, I am NOT a developer and you don’t need to be to do this. So feel free to cut and paste some Google’d HTML “code”, for drawing an HTML table or use what I stuck into the Build HTML form action and you’ll be in business! :).
So, I went ahead and built a Nintex workflow that takes the column data entered into the list, builds a file name and performs an error check to determine if the file already exists in the library, generates the HTML document dynamically and then writes that document into a library.
Nintex Workflow 2016
Nintex Workflow 2013
Nintex Workflow 2010
SharePoint Server 2016
SharePoint Server 2013
SharePoint Server 2010
Building the Workflow
You’ll need to create some variables to store data for this workflow:
Now we need to drop some actions onto our design canvas that perform the following actions:
Below is how I configured the Build string action. As you can see the forms HTML structure is simply saved into the action and then references to the column data are inserted as necessary. It’s also worth noting, since I’m saving this out as an HTML file, you CSS wizards out there could probably dress this form up quite a bit more than I did!
Now, when an item is created in the Customer Data List it will take the columns that we defined inside of the build string along with the HTML framework for the form and write it out to the document library. This could be quite helpful when creating a permanent record or a more attractive document that can be published to a web site or communicated via email or any other use you could imagine!
|I hope this post helps. Feel free to grab a copy of the workflow export via the attachments control below. Feel free to let me know what you think and go ahead and share your experiences in the comments below!|