My SharePoint Log

SharePoint 101 Auto Create Documents based on SharePoint Designer Workflow

It’s been a while since I’ve built something with SharePoint Designer Workflow, I kinda missed it. ūüôā

An opportunity showed up, when i received a business request to automatically create documents based on a SharePoint list item. This post will describe the steps needed to make this work without custom development.

Business requirements:

  • A list item describing a meeting agenda
  • Automatically creates a new meeting documents based on the list item
  • The Document should have text prefilled out
  • If the meeting agenda is updated so should the document
  • If the meeting is confidential, the documents should be accessed only by site owners

Main Goal:

  • An overview of all upcommming meetings and their agendas
  • Automate the creation of meeting documents

End solution:

The solution for this is built with standard SharePoint List and 3 SharePoint Designer Workflows

  • One Custom List | containing meetings agenda and relevant data fields.
  • One custom document content type “Meeting Agenda” with the document template
  • One Document library | containing “Document Set” and custom word Content Type
  • The meeting content type will contain “Smart parts”
  • One Workflow for creating the document set and the meeting document
  • One Workflow for updating the document set
  • One Worfklow with impersonation for setting permissions

Preparations:

Before creating the workflows we need to create the custom lists we’ll need, enable the content types we need, then make changes to our word template file:

In SharePoint create a custom list named “Meeting Agenda”, with relevant fields, this is my sample:

workflow001

In SharePoint create a new content type “Meeting Agenda” | upload your document template

workflow002

In SharePoint create a new document library “Meeting Documents” | enable “Management of Content Types” then add “Document Set” and “Meeting Agenda” to the library.

workflow003

Add the custom colums you will use in the “Meeting Agenda” to the library, beware that this can also be created as site columns ect.

These columns will be added to the “Document Set” | and configured to inheritance | remember the “MeetingID” column we will use it to update list items.

workflow004

workflow005

In the advanced settings for the “Meeting Agenda” content type edit the word template

workflow006

Using “Quick Parts | Document Property” connect the columns you need to the tempalate then save the template:

workflow007

Creating workflows

Using SharePoint Designer 2013 login to your site | click workflow | list workflow |

Our first workflow is called “Create meeting doccument” attached to “Meeting Agenda” List

workflow008

SharePoint and SharePoint Designer sometimes encodes text, people pickers and date field differently, I then use Workflow variables to convert the data.

Example, i want the comments in “Plain Text”.

Then use the “Create list item” to create a new document set and Document based on the content types

workflow009

This actions creates the meeting documents | we don’t need to add all the colums as it will be added by the document sets.

workflow010

Create a new list workflow | this workflow will use the action “Update list item” | remember to filter the item using the “MeetingID” from earlier

workflow011

Our last workflow is attached to the “Meeting Document”

We will run a SharePoint 2010 Workflow “Impersonation Step” | Replacing the Document Set item permission with a new one.

workflow012

We will now have 3 Workflows

workflow013

“ChangeItemPermissions” | This workflow should run by creation and every time the document set changes

“Create meeting document” | This workflow should run only once when a new meeting agenda is created

“Update meeting document” | This workflow should run only when the meeting agenda list item is edited

Publish your work and test your solutionworkflow014

workflow015

This is how the “Meeting document” will look like when everything is done

workflow016

 

Happy “SharePoint’ing” | We’re not done with SharePoint Designer yet!!!

 

PS! in case someone wonder why I’m using “Document set”, it’s because some of the meetings sometimes have additional documents that should be included. Using the “Document Set” will allow uses to upload additional files that should be attached to the same meeting.

 

SharePoint 101 – InfoPath 2013 and SharePoint Designer 2013

Microsoft released SharePoint 2016 RC on January 20, 2016.

https://blogs.office.com/2016/01/20/sharepoint-server-2016-and-project-server-2016-release-candidate-available/

With this release we also received official statement about SharePoint Designer 2013 and InfoPath 2013. This is great news since I have many customer that still want to build lightweight business applications, and we don’t want to use 3.party solutions or tools.

As we continue to evolve, we recognize the need for a long runway as we augment existing business app offerings with new tools and capabilities. As a result, we’re updating the support timelines in conjunction with SharePoint Server 2016, specifically:

  • SharePoint Server 2016 will include an ongoing capability to host InfoPath Forms Services. InfoPath Forms Services on SharePoint 2016 will be supported for the duration of SharePoint 2016‚Äôs support lifecycle.

  • InfoPath Forms Services on Office 365 will continue to be supported.

  • InfoPath 2013 and SharePoint Designer 2013 will be the last versions of those products. SharePoint Designer is not being re-released with SharePoint Server 2016, although we will continue to support custom workflows built with SharePoint Designer and hosted on SharePoint Server 2016 and Office 365. Support for InfoPath 2013 and SharePoint Designer 2013 will match the support lifecycle for SharePoint Server 2016, running until 2026.