SharePoint Workflow – Part 1

18 August 2009 Categories: How To, InfoPath, SharePoint, Workflow

After reading several articles about the built-in Workflow in SharePoint, I wanted to reach out and set a more advanced example. Many articles always state the obvious approval workflow, or check in/out. Well there is much more that can be done with ease. Why other authors do not discuss these, I don’t know, lack of knowledge, who knows. So here we go.

1. Using workflow with data in a document or form library.

Custom Column for Article Type

Custom Column for Article Type

When storing a document in SharePoint, by default there is not any meta-data entered. These have to be configured with custom columns. Not a difficult ordeal. Simply create a document library, and add columns to the library. Now when you upload a document you will be asked to enter the information pertaining to the document.

So now you can select a type of article like Customer, Management, HR, etc. This tells users more information about that document without opening it. You can add as many columns as needed to describe the data. This also creates more content for the search to index, better qualifying your document for best results.

Now once you have selected a type you now have data to work with. Using SharePoint Designer you can create a workflow for that library. You can make this workflow react based on that information. For example, when a document is uploaded and the article type is HR, then you can start an approval process only to HR, or whomever is selected in the data. A workflow can also write the data associated with the file if that is needed.

If this were an InfoPath form you would add the columns in the InfoPath publishing wizard.

Document Properties

Document Properties

Instead of uploading you can use your own document template living in SharePoint. Notice what happens in Word when you create a new document directly from SharePoint. You have the option of completing these fields directly in Word and they will be published into SharePoint with the document when it is saved. Requirements can also be configured in SharePoint.

***Caution – If a workflow is enabled using this information variables must be set in the workflow to guarantee that the document is complete and ready for the process to start. Even creating a column that must be checked for the workflow to start would be sufficient.

2. Manipulating data in SharePoint Lists

One of the nice features of SharePoint is the ability to create your own custom lists. This is a very simplified usage of forms without using InfoPath. It has many limitations however that we don’t need to discuss. We will go ahead and use a guestbook list as an example here. This guestbook will be for a wedding and we will have thank you emails sent automatically 7 days after the wedding.

Custom Calculated Formula

Custom Calculated Formula

Start by creating a custom list in SharePoint. “Title” is a default column name in SharePoint, and can be changed to a different name on the list. We will change that to Last Name and create several other colums, First Name, Relationship (drop down list), email address, and guest names. Additionally we will need to create a calculated value column which reads:

=Modified+”7″

This formula will make a date that is 7 days after the modified date.

New Guest List

New Guest List

Your list should look something like the image to the right. Now open SharePoint Designer and create a new worflow. Set the condtion to be a compaison of data and set as Email Date is equal to Today. This will make the workflow wait to send email until then.

The action needs to be set to email a message. The “To:” field is the email address entered in the form. You can even get creative with the names. Remember the guest names that were asked to be entered? Well you can set an else if condition also which states that if the guest name field is not empty to send a different message which would include all the names in the greeting.

Workflow Conditons

Workflow Conditons

These are two very simple examples of uses with SharePoint workflow. Many other functions are available without writing code. All of these features can be used to create many different applications for SharePoint like a support ticket system, remiders and more. Many of these are never mentioned and should be.

Advanced? Check out the things you can do with adding a third party workflow solution like K2 BlackPearl!

Part 2 of SharePoint Workflow next week!

Read the full article 1 Comment
PHVsPjwvdWw+