Sample SharePoint workflows

Check out a document from a workflow in SharePoint 2010

Suppose you have a SharePoint Document Center site of which the Document ID Service has been enabled on the site collection to which the Document Center site belongs. This means that each document on the site can be uniquely identified by a Document ID, no matter where the document is located. Suppose now that you want to create a SharePoint Designer ...

SharePoint Designer 2010 workflow to set time portion of a date/time

In Construct a date from strings in a SharePoint Designer 2010 workflow you saw how to create a date by concatenating two strings in a SharePoint Designer 2010 workflow. In the SharePoint Designer 2010 workflow in this article, you will set the time portion of a date and time field in a SharePoint list by concatenating a date and a time ...

Construct a date from strings in a SharePoint Designer 2010 workflow

You have a string that contains a date and a string that contains a time and you want to be able to construct a valid date from these two strings using a SharePoint Designer workflow. Constructing a date from strings involves two things: Concatenating string values to form a valid date. Converting the resulting date string into a date type. You can use ...

SharePoint Designer workflow: Check if today is Saturday or Sunday

In a recent article I showed you how to use the Return fields as option on the Lookup for Number dialog box in a SharePoint Designer 2010 workflow to convert a string to a number. You can use a similar technique that uses SharePoint Designer workflow variables to check whether today is Saturday or Sunday in a SharePoint Designer 2010 workflow ...

Define workflow variables in SharePoint Designer 2010

You can see a workflow variable as a storage container inside a SharePoint Designer workflow. Workflow variables in SharePoint Designer allow you to temporarily store data or the result of a calculation at one stage in the workflow so that you can retrieve and use this information later on elsewhere in the workflow. There are two ways to create workflow variables ...

Set the current time using a SharePoint Designer 2010 workflow

Problem You have a SharePoint list that contains a text field named CurrentTime in which you want to save the current time (without the date) by using a SharePoint Designer 2010 workflow. Solution You can retrieve the current date and time from the workflow context and then use this to return the time as a short time. Discussion To use a SharePoint Designer workflow ...

Convert string workflow variable to number in SharePoint Designer 2010

In SharePoint Designer 2010 you have the option to create workflow variables that have one of the following data types: Boolean Date/Time Integer List Item Id Number String Suppose you have defined two workflow variables in a SharePoint Designer workflow: stringVar with data type String numberVar with data type Number Now you want to set the value of stringVar to the value of a "Single line of text" field named ...

Format a date in a SharePoint workflow using a SharePoint formula

You can use a custom SharePoint Designer action to format a date in a workflow, but if you do not want to or cannot write code, you can also use a SharePoint Calculated column to format a date in the same SharePoint list a workflow is running on or in another SharePoint list. But whichever method you choose, you will have ...

Format a date in a SharePoint Designer workflow using a custom action

As you may already know, SharePoint Designer 2007 does not offer an out-of-the-box workflow action to be able to format dates. However, you can follow the instructions given in Building Custom Activities for Use in SharePoint Designer 2007 to create a custom workflow action that can be used in SharePoint Designer 2007 to format dates. Create the Workflow Activity Library project In ...

Get a SharePoint list item GUID using a SharePoint Designer workflow

GUIDs are the next best thing after IDs for being able to uniquely identify SharePoint list items, so you could use a GUID instead of an ID to look up a SharePoint list item. There are two occasions on which you might want to get the value of a GUID of a SharePoint list item in a SharePoint Designer workflow: If you ...

How to send an email alert containing a link to a SharePoint list item

SharePoint email alert scenario You have a SharePoint Tasks list in which new tasks are periodically created. You want to be able to send an email to the person assigned to the task and have the email contain a link to the task so that the assignee can easily click and open the task in SharePoint. Send an email message with a ...

Using a GUID to look up a SharePoint list item instead of an ID

Introduction I've previously written about the basics of defining a workflow lookup in SharePoint Designer. In that article, I also mentioned that you have to ensure that you use either a SharePoint list item ID or GUID to ensure that the item can be found. In this article, I'll create a sample workflow - actually 2 workflows - to demonstrate how you ...

Using the Log to History List SharePoint workflow action for debugging

Introduction You can use the Log to History List SharePoint Designer workflow action to write messages to the workflow history list during the lifetime of a workflow. These messages can serve as a way to report the status of the workflow back to the user. You can also use the Log to History List SharePoint Designer workflow action to debug a SharePoint ...

SharePoint Designer workflow: Create a new document based on a content type

Scenario You want to use a SharePoint Designer workflow to create a Word, Excel, or any other type of document that is based on a document template that was added as a content type to a SharePoint document library. Solution You can use the Create List Item action in a SharePoint Designer workflow to create a new document that is based on a ...

4 Ways to set a date value in a SharePoint Designer workflow

The values of dates in SharePoint Designer workflows can be static or dynamic, that is, you can set them to be a specific date (static), or you can calculate them or set them to the value of other date fields (dynamic). You have 4 options when it comes to setting the value of a date field in a SharePoint Designer ...

SharePoint Designer workflow: Move a document from one library to another

Scenario You have a document on which you want to start a workflow that will move the document from one document library to another. Solution Moving a document using a SharePoint Designer workflow involves copying the document to the SharePoint document library you want to move the document to, and then deleting the document from the current document library it is in. You can ...

SharePoint Designer workflow: Allow users to enter an email address before running a workflow

Scenario You want to select a document in a SharePoint document library, start a workflow on this document, enter an email address, and then click to send an email to the recipient who is required to approve the document. Solution You can use an initiation form in a SharePoint Designer workflow to enter an email address (or any other data) before the workflow ...

How to perform date calculations and construct dynamic strings in a SharePoint Designer workflow

Scenario When you store a document in a SharePoint document library named DepartmentDocs, you want to create a new list item in a Tasks lists named ProjectTasks. The new list item should have the name of the document in its Title and the due date of the new list item should be set to 3 days after the date the document ...

Visual Studio workflow: Copy a document from one SharePoint document library to another

Workflow description This article demonstrates how you can create a Visual Studio workflow that can be manually started on a document in a SharePoint document library to copy that document to another document library on the same or another SharePoint site. Creating the custom SharePoint workflow In SharePoint, create 2 document libraries: One to copy documents from and another one to store the copied documents ...

SharePoint Designer workflow: Send email when major versions of a document are checked-in

Scenario You want to be able to send an email to one or more users whenever a document is checked into a document library and a major version (e.g. version 1.0, 2.0, 3.0, etc.) is assigned to the document. Solution In SharePoint, ensure that versioning (major and minor versions) is enabled on the document library where the documents are stored. In SharePoint Designer, open the ...