reminder-emails.jpg

Sending Reminder Emails Using SharePoint Designer Workflows

Grant Lewis is an Software Engineer with ThreeWill. Grant's consulting experience consists of using Microsoft technologies to enhance business operations in a manufacturing environment.

Sending reminder emails

A client of mine recently had a need to send Reminder emails at certain intervals. For many people, the best way to achieve such a behavior would be with a timer job. However, there are no timer jobs in O365, so with an eye to the cloud, I set out to find another solution.

The basics of creating looping workflows with SharePoint Designer

In the ideal case, we would create a SharePoint workflow that would wait until a designated time, send a reminder email, schedule the next reminder time, and wait again. However, SharePoint Designer workflows do not give you the ability to loop in this manner. Also, starting in SharePoint 2010, a workflow cannot trigger itself to prevent infinite loops, but that is exactly what we want in this instance. A well-known workaround for this is to create two workflows that call each other to simulate this looping behavior, which is the method I will use in the following tutorial.

Using Calculated Columns to modify dates

SharePoint Designer workflows are limited when it comes to working with dates. The only two operations that are available to modify a Date/Time field are “Set Time Portion of Date/Time Field” and “Add Time to Date”. The “Add Time to Date” action is potentially useful if you wanted to do things on a daily, weekly, monthly, or annual basis; however, my requirement was to send reminders on the last day of the month. Because the number of the days in a month changes, this meant that I needed to somehow calculate the last day of the current month. The best option that we have for manipulating dates in SharePoint without custom code is using calculated columns. In a calculated column, you can use the DATE function just like you would in Excel.

Let’s say I have a column called “DateColumn” that has a date. Here are some examples of date formulas that can be used with calculated columns:

  • The next 15th day of the month (could be either later this month if we are currently earlier than the 15th in the month, or it may be next month if we are past the 15th in the month):
    DATE(YEAR([DateColumn]),IF(DAY([DateColumn])>14,MONTH([DateColumn])+1,MONTH([DateColumn])),15)
  • The last day of the current month:
    DATE(YEAR([DateColumn]),MONTH([DateColumn])+1,1)-1

Creating the SharePoint lists

The first step is to create a list (“List A”) that will be used to drive the reminder email workflow. For my example, this list had three fields:

  1. Title (Single line of text) – the default title column, also used to link to the other list
  2. LastReminderTime (Date/Time) – the last time the reminder was sent, used to calculate the next reminder time
  3. NextReminderTime (Calculated Column) – calculated from the current time to find the next reminder time. Set the return type to “Date and Time”

The other list (“List B”) only has two fields:

  1. Title (Single line of text) – this should match the title of the other list for the lookup
  2. LastReminderTime (Date/Time) – this field will be copied from the first list

Creating the SharePoint Designer Workflows

First, create a list workflow for List A to send the reminder emails. This workflow needs three steps:

  1. Pause until Date – set the date to the NextReminderTime field of the current item.
  2. Send an Email – send the email as required.
  3. Update List Item – set the LastReminderTime field of List B to the value of NextReminderTime in the current item, looking up the correct list item on ListA:Title = ListB:Title.

Set the start condition for this workflow to “Start workflow automatically when an item is changed”. Publish the workflow.

Next, create a list workflow for List B to update List A to create a loop. This workflow just has one step.

  1. Update List Item – set the LastReminderTime field of List A to the LastReminderTime of the current item.

Also set the start condition for this workflow to “Start workflow automatically when an item is changed”. Publish the workflow.

Initial Setup

First, create an item in List A. Give the item a Title, but nothing else. Next, create an item in List B with the same title as the item in List A. Go back to the item in List A and add a value for the LastReminderTime such that the calculated NextReminderTime will be a future date and time.

And that is it. Your reminder email process is in progress. You should receive an email reminder at the time specified by the NextReminderTime field in List A. The Reminders should be continued to be sent on a schedule defined by the calculated column field that you set up.

read more
Grant LewisSending Reminder Emails Using SharePoint Designer Workflows
helpful-tips-3.jpg

How to Copy an Approval Workflow and Retain Its Custom Task Form

Caroline Sosebee is a Software Engineer at ThreeWill. She comes to us with 20+ years of software development experience and a broad scope of general IT support skills.

Background on why I needed to copy an approval workflow

Recently, one of our clients had a unique problem with workflows that required me to go into ALL the workflows, verify the email settings and correct them as needed. Since there were around 10 large approval workflows and several other basic notification workflows, this was no trivial task.

We’ve found in our experience that when changes are needed to an approval workflow, it’s best to make a new version of it in order to not disrupt any currently running approval workflows. One of the major pain points in copying an approval workflow is having to rebuild the custom task form associated with it. I REALLY didn’t want to have to do this for 8 to 10 workflows, each with their own custom task form filled with details. So I talked with co-workers, dug around on the internet and tested and played until I came up with a way to retain my custom forms. This post details out those steps (as well as how to copy the workflow itself). Of course, this is just one way to do it. I’m sure there are plenty of other ways that might be better, but this seems to work well for me. I hope it helps someone!

The problem itself that caused all this angst was an interesting one. It surfaced when our client acquired another company and joined the two domains. Suddenly there were two Active Directories being checked when an email was sent. The problem arose because some of the email recipients in the workflows were set to send to a ‘Display Name’ format instead of to an ‘Email address’ format. This meant that if an email is supposed to go to ‘John Doe’ and there is a ‘John Doe’ in both ADs, it was a crap shoot as to which John Doe would receive the email – the one from domain A or the one from Domain B. Definitely not the behavior we wanted! So all the workflows had to be checked and updated to be sure all emails were being sent to email addresses. Here are the steps I took to get these corrected.

Part 1 – Copying the approval workflow itself

One note before you start: I’m going to have you opening and closing SharePoint Designer for what feels like a million times. Do it even if you don’t feel like it. J SharePoint Designer does some really weird things with caching, etc. and this will help keep everything straight.

  1. Open the site in Microsoft SharePoint Designer.
  2. Click on the Workflows link on the left to display all the workflows, select the workflow you want to copy, right click it and select ‘Copy and Modify …’.
  3. Give it a new name and click OK. The workflow will open to the main workflow settings screen.
  4. Click Save to save any changes that may have been made in the background and then close this window (do NOT publish the workflow yet).
  5. Now go to All Files / Workflows and find the folder for the new workflow. It should contain three files.
    (The three files you should find.)
  6. Click on the ‘xxx.xoml.wfconfig.xml’ file to open it and select ‘Edit file’.
  7. Since this is an approval workflow with an approval task, there will be a couple of references in this file to the task – we need to update these. When a workflow is copied, SharePoint renames any tasks it finds by tacking a ‘ Copy’ to the end of the existing name (only one in this case). So search this file for the text ‘Task Copy’ to find all the references and rename it to something new (but be sure to retain the ‘_Task’ in the name). Make sure to note what you named it for the next step.
  8. Now save the XML file and exit SharePoint Designer.
  9. Reopen SharePoint Designer and open your new workflow from the Workflows link, then click the ‘Edit’ button to open the workflow for editing.
  10. Find the ‘Start task process … ‘ statement and click on the ‘… Task Copy’ link. When it opens, click in the Name field and rename it to the same name you noted above. In this example, I renamed ‘BI_PreProduction_Approval_v3_Task Copy’ to ‘BI_PreProduction_Approval_v4_Task’.

  11. If you have other changes that need to be made to the workflow (that do not involve the task form), you can make them now. When done, save the changes and Publish the workflow. You now have a clean copy of the original workflow. On the workflow settings page for the copied workflow, you should see two generic forms that were created for you.
  12. The last step is to delete this new ‘Task’ form that was just created for you (in preparation for copying the original one). You do this by highlighting it and either pressing the Delete key or clicking the Delete button in the toolbar. You can ignore the form with a type of Association/Initiation (for this exercise anyway).

Part 2 – How to copy an existing custom task form to a new workflow

This is usually the painful part of copying a new workflow, as the custom task form is NOT copied with the rest of the workflow when you do a ‘Copy and Modify.’ This means you have to recreate it manually, which can be a major pain. Luckily, there is a way that allows you to reuse the old one in the new workflow. Here are the steps:

  1. In SharePoint Designer, open the old workflow to the main settings screen.
  2. Open the custom form you want to copy (will be of type ‘Task’) by clicking on its name. This will open the form in InfoPath.
  3. After it opens in InfoPath, click on File then Publish. Choose the ‘Export Source Files’ option and save them somewhere on your local drive where you can find them. A temp directory is fine.
  4. Close InfoPath, choosing ‘Don’t Publish’ when prompted.
  5. Close SharePoint Designer.
  6. Using Windows Explorer, navigate to the folder where you saved the InfoPath files.
  7. Right click the manifest.xsf file and open it using your favorite text editor.
  8. Within this file, search for all references to the original xsn file. I find it simplest to search for ‘.xsn’. There are a couple of things to change here:
    • The path to the .xsn file – will need to match the path to your new workflow. You can verify this path within SharePoint Designer, under All Files.
    • The name of the .xsn file – should be the same name as the workflow, with a ‘_Task’ following it. (You should follow the pattern used already for naming.)
  9. Save the file and close it.
  10. In Windows Explorer, right click the saved manifest.xsf file and select Design. This will open the file in InfoPath.
  11. Once open, we simply need to publish the form. If the name and path are set right, the form will be added to the new workflow. To publish, you can either click the ‘x’ in the top right corner and select ‘Save and Publish’ when prompted, or select File then Publish. If you choose this way, you can verify the location and name of the form to be published. If these look correct, click the ‘Workflow’ button to publish.
  12. Close InfoPath if it is still open.
  13. Re-open SharePoint Designer and connect to your site.
  14. Find the new workflow and open it to the main settings page. You should see your new custom form listed, along with the already existing Association form. To verify, click on the form to open it in InfoPath and your custom form will be displayed. You can now close InfoPath (choosing to publish or not).
  15. Back in SharePoint Designer, publish your workflow.

And that’s it! You now have a new copy of an old approval workflow and have retained the custom form you worked so hard to build in the original workflow. I hope this saves someone some of the headaches I’ve had in the past while copying workflows.

Enjoy!

read more
Caroline SosebeeHow to Copy an Approval Workflow and Retain Its Custom Task Form
switch.jpg

Switching SharePoint Views Defaults from Standard/HTML to Edit/Datasheet/GRID and Back

Kirk Liemohn is a Principal Software Engineer at ThreeWill. He has over 20 years of software development experience with most of that time spent in software consulting.

I recently created a new list by uploading an Excel spreadsheet to SharePoint 2013. I’m sure there are several blogs telling you how to do this, but here is one that you may find useful.

The problem I encountered, however, is that after uploading the spreadsheet to Excel, the view that was created was automatically in edit mode (a.k.a. Datasheet view). I guess the thought was that people using Excel would like to be in that mode by default. I didn’t want that so I figured out how to switch it back. It wasn’t entirely obvious, so I thought I would share.

I knew I could create a new view from scratch that was not in edit mode by default, but this view had been updated to have many of columns in a specific order, and I really didn’t want to do it manually. Plus, I knew there had to be a way. I started out looking at the view in the browser and didn’t see anything. Then I edited the page and looked at the web part properties for the view, but that didn’t help either.

The solution was to open the site in SharePoint Designer 2013 and navigate to the view itself. Upon opening the view I saw the following HTML (I have seen this on line 37 and 38 for me depending on the view):

<View Name="{24C927B3-0768-4129-9A41-73961AA48508}" DefaultView="TRUE" Type="GRID" DisplayName="All Items" Url="..." [a bunch more attribues]>[a bunch of child elements]</View>

I simply had to change GRID to HTML and save the page:

<View Name="{24C927B3-0768-4129-9A41-73961AA48508}" DefaultView="TRUE" Type="HTML" DisplayName="All Items" Url="..." [a bunch more attribues]>[a bunch of child elements]</View>

I got a notice about the page being customized (unghosted) which was fine for me. You can change these back and forth and it works fine. SharePoint Designer shows a summary of all views for a list and their type (HTML or GRID). That summary is cached so it doesn’t update after you save the changes to the ASPX page directly.

read more
Kirk LiemohnSwitching SharePoint Views Defaults from Standard/HTML to Edit/Datasheet/GRID and Back
approved1.jpg

SharePoint Workflow Approval by Only One Member of a Group

Caroline Sosebee is a Software Engineer at ThreeWill. She comes to us with 20+ years of software development experience and a broad scope of general IT support skills.
I recently had a need to create an approval workflow that would assign an approval task to a group of people but would only need one person to actually approve or reject the request. I’ve worked on several fairly complex approval workflows but have never had to allow for this. So I searched around for a bit (how did us developers ever manage pre-internet?!) and I found this Stack Exchange question that gave me the clues I needed to get the job done.

It turned out to be a fairly simple process with only a few places that needed changes, via SharePoint Designer. I know this is only one of many ways I could have accomplished this, so feel free to modify to suit your own requirements.

Note: These steps assume an approval workflow has already been created and is editable.

Set the Task Process to Parallel

The first – and very important – piece is that the task process must be set to Parallel (all at once). The whole idea is that a group of people all have the authority to approve or reject requests but only one is needed to complete it. Thus, whoever can get to the request first will be able to complete the approval, effectively taking it off everyone else’s to do list. If the task process is set to Serial (one at a time), then only the first person in the approver list will be assigned a task initially. The rest of the group will not be assigned a task until each person in front of them completes theirs, which is counter intuitive to the whole idea here.

So here’s how to change this setting. First things first, edit the approval workflow.

Once open, click on the these users link (if you have already set this value, then user names will display here instead).

A dialog will open where you will find a dropdown that allows you to set how the tasks will be created – Parallel (all at once) or Serial (one at a time). After changing, click OK to return to the workflow edit screen.

 

Change the behavior of a single task

The next step is to modify the code in the When a Task Completes section.

You get here from the workflow edit screen by clicking on the name of your process in this case ‘CertificationApproval’. This will open the task process edit screen with various options that allow you to customize your task process.

Once the task edit screen opens, click on the Change the behavior of a single task link found in the Customization area.

Within the When a Task Completes section, add a ‘Set Workflow Variable’ action inside the IF statements for both the Approved and the Rejected checks that sets the IsItemApproved flag appropriately, based on whether Approve or Reject is clicked.

Change the completion conditions for this task process

The final step is to change the workflow completion behavior to be based on this flag.

Navigate back to the task process edit screen and from the same Customization area, click on the Change the completion conditions for this task process link.

When an approval workflow is first created, it generates code that checks task counts to determine if all the tasks have finished and if so, ends the task process. Obviously this will not work when there are multiple approvers (each with their own task) and only one approval or rejection is required.

OOTB Code

By rewriting this block of code to check the isItemApproved flag (now being set when a task completes) instead of task counts, we can control when to end the approval process ourselves, instead of relying on counts.

All that needs to be done here is to replace the OOTB code with checks on the isItemApproved flag. Based on its value, you can perform any number of actions suitable to your own unique requirements. For mine, I only needed to log an appropriate Completion Reason and then call the End Task Process action which triggers the approval workflow to complete.

New Code

Finished!

And that’s all there is to it. Publish the workflow and then start it for an item. Assuming that you’ve assigned a group of people to the approval process you will see multiple tasks created, one for each person.

If you then open one of the tasks and click Approve or Reject, you will see that the outcome for the one clicked will be set accordingly, all the other tasks for this workflow will be set to Canceled and the workflow itself will be marked as complete.

read more
Caroline SosebeeSharePoint Workflow Approval by Only One Member of a Group
waiting.jpg

Waiting for Change in a Workflow

John Underwood is a Technical Evangelist at ThreeWill. He has nearly thirty years of software development experience. He is an experienced technical instructor with superior presentation skills and is proficient in delivering standard curriculum as well as developing and delivering custom curriculum.

Transcript

John Underwood here at ThreeWill and today I’m going to show you some tips and tricks that I’ve learned in some recent work with workflows. So you’ll notice on the screen that I have a sample library named resumes and then it has a choice field in it that would let us track the status of a resume if someone goes through the hiring process. Now I have a desire to make it so that I can have a workflow that runs and does certain things as the person advances through the process. So what I’m going to do now is go to design and create a new workflow and then we’ll see if we can make the logic work on this.

Now I begin the process by kind of laying out my stages. This is something that I’ve started to do recently where I almost think of stages as being like a block diagram um, those of you that have done UML or other entity modeling things, think of this as being the high level entities or steps that you’re going to take and then once I’ve kind of laid out the basic flow of the problem then we’ll go in and fill the details. So you can see as I complete these that the names of the stages kind of represent the different parts of the process and I think it’s really important that you name these stages in user friendly fashion.

After all, if you’re not already aware of this you’re going to see that the stage names actually show up in a place where user would easily be able to see them, not only that, there’s really how they’re going to make a determination about where you are in the workflow process. So you can see I’ve got all of my stages laid out now, so I’m going to go in and add a little logic and basically what I want to do here is wait until my status changes. Now you can see I’ve put in a wait here and so I’m going to tell it what field I’m waiting on and then once I’ve chosen my candidate status field notice a little challenge here, I can’t click on the equals part of this and say that I want it to equal or not equal or be greater than or less than or any of the kinds of comparisons that we would expect.

So I could swear that earlier versions, 2010, had this, maybe they did, maybe they didn’t but either way that’s not going to work in this circumstance, so what I’m going to do is delete the step and I’m going to try another approach. So my next approach would be to in a parallel block and essentially what I would say is I’m gonna wait for all of the various values that might come up, so you can see I’m laying that out on the screen right now or I’m going to say, wait for this value, wait for that value, wait for the other value and then the idea here is that once one of these hits I can then progress ahead and I can do what I need to do.

Now at a very high level I see two potential problems with this. The first one is in my case I’m only waiting on three things. If you had a choice field that had eight or nine different items this might become a bit laborious and you might have to seek another approach to solve the problem. But the bigger or more immediate problem that I have here is the nature of doing things in parallel, so if you didn’t already know this what you’re about to find out is that when you do these parallel actions you’re not going to continue until all of them complete and the challenge that I face here is that by definition these are sort of mutually exclusive, so in effect what I’ve done is put in some logic that essentially freezes me where I’m at.

Now the good news here is that we do have a solution to our problem, so what I want to do is delete parallel block and then I’m going to add another parallel block, and in this case instead of placing actions directly inside the parallel block, instead I’m going to place steps and then place my actions inside of that and as we go along you’ll see why this is important. So you can see I’ve entered the three steps and I’m going to name each of them appropriately based on what the step is going to be responsible for.

Now you’ll notice just above my parallel block I’m going to declare a new workflow variable, I’m going to name it done waiting, and it’s going to be of type Boolean and what purpose is it going to serve, you’ll see this unfold over the next few moments but basically I’m going to use this Boolean as a way to exit my parallel block once one of my wait conditions is met. So as you can see I’ve declared it is Boolean and I’m going to set its initial value to false or no.

Now I’ll go down into each of my steps and not only will I put in the wait condition that I’m interested in but I’ll also but in some logic that would change my done waiting variable from no to yes, by doing this in effect what I’m saying is I want to short circuit the parallel block and go ahead and exit.

Now you can see I’ve completed filling in all of the various steps that are involved in my parallel block. The last little bit here is I’ve got to tell this parallel block that it’s okay to exit once this Boolean becomes true. So I’m going to right click and go to advance properties and essentially I’m going to tell it the variable to monitor, once that variable becomes true then it will exit the wait condition and continue on to the rest of the workflow.
Now if you look carefully at the screen you’ll see that I’ve added some additional parts here such as the logic to edit this stage, I’ve also put some messages in the other stages, so I’ll check for any syntax errors and then I’ll go ahead and publish this so that we can test the logic.

Now I’ll switch to my browser and you can see I already have the resume’s list loaded. I’ll go ahead and select one of the resumes and then invoke the workflow that I’ve just configured. You can see the resume candidate flow, I’m going to invoke that and then once I’ve invoked it I’ll go back and refresh the list just so that we can see that it has started. Once we’ve started it we can go in and edit a property value and in effect move this candidate to another state. In this case we’re going to say that this was a candidate we were not interested in hiring so their status is now set to rejected.

Note that once I’ve set it to rejected I can now go look at the workflow history and actually see the steps that we went through and indeed my wait logic did do the right thing, it waited until we achieved a certain state and then transitioned to the proper stage of the workflow so that we could complete the process.

So to recap what we covered here, number one, when you’re dealing with a choice field and you need to wait for various values there’s no way that you can change from equal to not equal on a normal wait, instead we have to use a parallel block. Second, when we use the parallel block we want to put steps in the parallel block and actions inside of steps as opposed to putting the steps directly in the parallel block and finally remember that we’ll use a Boolean variable along with an advance property of the parallel block to short circuit and exit once a single condition is met.

read more
John UnderwoodWaiting for Change in a Workflow
approve-pen.jpg

Configure SharePoint Approval Workflows with SharePoint Designer

Tim is a Senior Consultant at ThreeWill. He has 15 years of consulting experience designing and developing browser-based solutions using Microsoft technologies. Experience over the last 8 years has focused on the design and implementation of SharePoint Intranets, Extranets and Public Sites.

SharePoint Approval Workflows

In the first blog of this series, I suggested that most users of SharePoint do not understand the full potential of the platform due to a lack of training.  Several areas that I mentioned being underutilized included:

  • Custom Lists
  • Notifications and Workflow
  • Security

In the second blog, I focused on some of the powerful benefits that could be experienced by creating and using Custom Lists in SharePoint to manage list data.  We walked through the process of creating a custom list to capture New Employee On-boarding activities and demonstrated the powerful sorting and filtering capabilities provided by SharePoint to make this data more useful.

In the third blog of the series, I discussed the ability to configure alerts on list items so that Managers could be notified when employees they manage were updated in the Employee On-boarding list.

In this fourth blog of the series, I’d like to focus on more complex notifications and Approval Workflows that can be configured using SharePoint Designer.

Workflow Notifications

In many cases, the List Alerts described in part III of this series provide everything that is needed to support a simple business process.  However there may be other business process scenarios where a more advanced notification is necessary.  Welcome to SharePoint Designer.  SharePoint Designer is a SharePoint Power User tool that can be used to create powerful workflows using a visual designer.  First of all, SharePoint Designer workflows can be configured to run automatically (when a list item is added, updated or deleted) and/or they can be configured to be started manually by a user.  Once the workflow begins execution, simple or even complex logic can be executed to determine process-appropriate activities that should be performed on the related list item or document.  While there are many different activities that a SharePoint Designer workflow can perform including copying data from one list to another, I’d like to focus in this blog on the activities pertaining to notifications.  In particular, I’d like to focus on the “Send an Email” and the “Start Approval Process” activities.

Send an Email

To demonstrate the “Send an Email” workflow activity, I’m going to create a simple workflow called “Notify Manager” which, in this case, will send an email to the person defined in the Manager column of the Employee On-boarding list.  I’m going to configure this workflow to run any time a list item is updated.

Send an Email, as the name suggests, is a simple activity to send an email.  The person, or list of people to whom the email is sent, can either be hard-coded where the value is always the same or dynamic in cases where logic needs to be applied to determine who should receive the email.  In this example, the recipient of the email will come from the Person selected in the Manager column. The Subject and Body of the email can be static, dynamic or even a combination of the two. Notice in the example below that the Subject is hard-coded, but the Body of the email contains a combination of static text as well as dynamic values from the list item that was updated (i.e. First Name, Last Name).

SDEmail

The net result is that Managers will receive a customized email each time one of the Employees they manage is updated.  This could easily be made more sophisticated by adding conditional logic where the email is only sent when specific columns are updated.

Next, let’s discuss the power of adding a workflow that contains a “Start Approval Process” activity.

Approval Workflows

In some business process scenarios, you want to receive feedback from someone within the process to ensure they have completed their tasks.  The “Start Approval Process” activity within SharePoint designer kicks off an Approval Process involving one or many individuals.  What makes the Approval Process different from merely sending an email is that a SharePoint task is created and assigned to a person or persons in addition to them receiving an email.  If more than one person is required for Approval, the Approval Process can be configured as “parallel” where all approvers receive their Approval task request at the same time or “serial” where the second approver only receives their Approval request after the first person has responded to their Approval Task.

In the case of the Employee On-boarding scenario, I want to define Approval Workflows for each of the main activities associated to employee on-boarding: desk assignment, computer provisioning, employee orientation and benefit enrollment.  I will configure these Approval Workflows to all kick-off when a new employee is added to the Employee On-boarding list.  To show some of the power of SharePoint Designer workflows, I am not going to hard-code the people who will be involved in the different Approval processes.  Instead, I am going to create a very simple custom list that has two columns:  Approval Category and Approval Person as shown below:

ApprovalAssignmentList

Now, I can configure the various Approval Workflows to do a look-up to this table to determine the person who will be doing the approval.  This will allow me to change Approvers over time by updating the Approval person in this SharePoint list instead of changing the workflow.  This would enable someone who doesn’t have SharePoint Designer Workflow experience to change the behavior of the workflow by updating a SharePoint list value.

Below is an example of a SharePoint Designer workflow called Computer Approval.  I will configure this workflow to run when a new item (i.e. Employee) is added to the Employee On-boarding list.  I will also configure it so the workflow can be started manually in case the person responsible for completing the Approval task “rejects” or chooses the “Unfulfilled” button when it runs the first time when the employee is first added to the list.  As you can see, the workflow is very simple…single workflow activity.  However, the Start Approval Process has a number of different configuration points where emails can be customized and additional functionality can be configured.  For this scenario, I am going to customize the email that is sent to the Approver or the person responsible for acquiring and provisioning a computer for the new employee.  I am also going to customize the Task form where the Approver will respond by either clicking a “Completed” button or “Unfulfilled” button indicating that the computer was provisioned successfully or whether there was an issue that prevented the computer provisioning.

The screen shot below demonstrates the customization of the Approval email that goes out to the person who will provision the Computer.  Each approver, in our scenario only one person, will receive an email and will also be assigned an associated Task in a task list.

ComputerApprovalEmail

Once an Approver receives this email, they would do the work that is necessary to fulfill the request.  In the case of the computer provisioner, they would be responsible for acquiring the appropriate computer for the new employee and delivering it to the employee.  Once this is completed, they should update the task to mark it “Completed.”  If there was a problem or is an outstanding question related to the request, they could enter any questions in the comments area of the Task Approval form and choose the “Unfulfilled” button.  In either scenario, an email will be sent to the Manager indicating either the fulfillment of the Computer provisioning or indicating the request is Unfulfilled plus the associated comments indicating why the request couldn’t be fulfilled.  In the scenario where the Task is marked “Completed,” I have configured the workflow to update the Computer Received column to a value of “Yes” in the Employee On-boarding list.

Below is an example email that an Approver would receive.  Note that the Outlook Client automatically creates a handy button to allow the recipient of the email to click the button to open the Approval Task so they can easily respond to the task.

ComputerApprovalRequestEmail

When the approver clicks the “Open this Task” button, the task screen below is presented to the Approver allowing them to indicate whether the request is Completed or Unfulfilled.  If Unfulfilled, they can add comments indicating the reason which will be sent back to the Manager.

ComputerApprovalTask

Note there is also a Due Date field that can be configured as part of the request.  If the Approval process had been configured to include a “due date,” this field would be populated with a date indicating when the task was due.  If the task is not completed by the Due Date, a follow-up email is sent to the Approver indicating the task is overdue.

If the “Completed” button is selected, the Approval process ends with the Employee On-boarding list being updated to indicate that the Computer has been delivered and an email is sent to the Manager as shown below:

ComputerReceivedYes ApprovalSuccessful

If the “Unfulfilled” button is selected, the Manager receives an email indicating the request was NOT completed along with the comments from the Approver.  Once any outstanding questions/issues are resolved, the Manager can restart the workflow manually so that the Computer request can be fulfilled.

ApprovalNotSuccessful

In this simple scenario, the Approval Process was used to request provisioning of a Computer and the Employee On-boarding list item was updated as part of the Approval process.  In addition, the Employee Manager was notified of the outcome of the computer Provisioning request.

I’m sure you can imagine other business processes where someone needs to be brought into a business process at a certain point in time to either perform some activity or maybe even to provide some relevant data.  A SharePoint Designer workflow leveraging the Start Approval Process activity is a relatively easy way to automate this process.  Missed deadlines due to someone forgetting to send an email are now replaced with immediate communication using the Approval email and reminders when a task is not completed based upon the defined task due date.  Business processes such as the processing of Purchase Orders can have a rather severe consequence if dates are missed and additional interest charges are applied.  Or even worse, business might be lost if a sales opportunity falls through the cracks.  These and many other business processes can be supported and tracked leveraging out of box (OOB) SharePoint functionality like alerts and workflows.

read more
Tim CoalsonConfigure SharePoint Approval Workflows with SharePoint Designer
half-full.jpg

Do You See SharePoint As Half Full Or Half Empty?

Tim is a Senior Consultant at ThreeWill. He has 15 years of consulting experience designing and developing browser-based solutions using Microsoft technologies. Experience over the last 8 years has focused on the design and implementation of SharePoint Intranets, Extranets and Public Sites.

As a SharePoint Consultant who has consulted at many different companies small and large, I have often experienced negative initial reactions when mentioning SharePoint.

The reasons have ranged from things like “SharePoint is slow” to other things like the “SharePoint navigation is confusing”. And I have to admit, there have been times I have used SharePoint sites that were both slow and confusing. The good news is that both of these can be improved so that they do not need to become a roadblock to using an otherwise useful product. But beyond merely removing these barriers, the good news is that there are many features that SharePoint provides that many users have never come to understand and appreciate and my goal is to help raise awareness of these features.

What I have learned over time is that most users’ concept of SharePoint is that it is simply a document repository…

They see it as a ”a place my boss forces me to put my files that takes more time and effort than storing them locally or putting them on a file share”. SharePoint is generally a product that has been introduced to the organization by the IT department for work teams to collaborate and usually with little or no training on SharePoint provided. And while storing documents is certainly a valid use of SharePoint, there is so much more capability than most users realize or have been given the rights to leverage in their work group or department.

On occasion, I have the opportunity to sit down with motivated employees who like to learn and I describe to them some of the features within SharePoint that I think will interest them.

Most users are surprised to hear about these capabilities and are eager to figure out how they can begin to use them.

My goal in this blog series is to share a few of what I consider to be the most underutilized features of SharePoint that can be leveraged for both personal productivity and business process improvements.

These underutilized features include:

  • Custom Lists
  • Notifications and Workflow
  • Security

After discussing these features individually, I’ll conclude with a discussion of how these features can be combined together to create Business Applications that can help support and automate some of your current business processes.

And before you assume that you need a developer or technical person to take advantage of these features, know that all of these are available to end-users of SharePoint and are configurable through the SharePoint UI or through SharePoint Designer.

Stay tuned. I look forward to sharing more about these underutilized features with you and hearing from you about any questions or comments on these topics.

By the way…

always-full

We thought you would enjoy this take on how different people see the half full/empty glass (source)…

The optimist says the glass is half full.

The pessimist says the glass is half empty.

The project manager says the glass is twice as big as it needs to be.

The professional trainer does not care if the glass is half full or half empty, he just knows that starting the discussion will give him ten minutes to figure out why his powerpoint presentation is not working (@jbutweets – thought you would enjoy this one!)

The consultant says let’s examine the question, prepare a strategy for an answer, and all for a daily rate of…

The engineer says the glass is over-designed for the quantity of water.

The computer programmer says the glass is full-empty.

read more
Tim CoalsonDo You See SharePoint As Half Full Or Half Empty?
hidden1-e1449679399551.jpg

Finding TaxonomyHiddenList

Pete is a Director of Technology at ThreeWill. Pete’s primary role is driving the overall technology strategy and roadmap for ThreeWill. Pete also serves as ThreeWill’s Hiring Manager and is constantly looking for new talent to join the ThreeWill family.

Recently, I needed to view some additional information about the meta-data defined for a client. I tried using SharePoint Designer 2010 to view the TaxonomyHiddenList, but the list does not show up for some reason (if I am missing something, someone educate me please).

Some digging in PowerShell to get all lists for a given site gave me enough information to go on and then by simply pointing my browser to [site url]/Lists/TaxonomyHiddenList/AllItems.aspx I was able to get the information I needed.

Taxonomy Hidden List Item

By the way, once you have the information like the ID, TermSetId and others (see the List Settings for the list schema), you can then query for list items based on meta-data and many other things using custom code. Peter Holpar has a great post, Some words about TaxonomyFieldValue and its WssId property, for using this information in custom solutions.

Hope this helps someone else in the future. Also, Check out our finding anything in SharePoint with Amazon-Like faceted search webinar.


SharePoint Designer and its sister product, Microsoft Expression Web are successors of Microsoft FrontPage. While Expression Web serves as the full-featured successor to FrontPage, SharePoint Designer focuses on designing and customizing Microsoft SharePoint websites. For instance, it only includes SharePoint-specific site templates. The first version, SharePoint Designer 2007, retains more FrontPage features than Expression Web (such as web components, database, marquee, hit counter, navigation bars and map insert.) SharePoint Designer 2007 was initially a commercial software product. On March 31, 2009, however, SharePoint Designer 2007 was made available as a freeware.

On April 24, 2009, Microsoft released SharePoint Designer 2007 Service Pack 2. On April 21, 2010, SharePoint Designer 2010 was released and made available for download. On October 24, 2011, Microsoft released SharePoint Designer 2007 Service Pack 3.

SharePoint Designer 2010, the successor to SharePoint Designer 2007, was released to web on April 21, 2010 in two flavors for IA-32 and x64 CPUs. Unlike its predecessor, however, it does not operate in absence of Microsoft SharePoint Server or Microsoft SharePoint Foundation and therefore cannot be used as a generic HTML editor.

On October 30, 2012, Microsoft released SharePoint Designer 2013.[1] This was the last version of SharePoint Designer; following the announcement of SharePoint 2016 in Ignite 2015 conference, Mark Kashman, Senior Product Manager of Microsoft announced that a corresponding SharePoint Designer would not be released with this product.[2][3]

read more
Pete SkellyFinding TaxonomyHiddenList
workflow-glow.jpg

Custom Workflow Activities

Tim is a Senior Consultant at ThreeWill. He has 15 years of consulting experience designing and developing browser-based solutions using Microsoft technologies. Experience over the last 8 years has focused on the design and implementation of SharePoint Intranets, Extranets and Public Sites.

I needed to display User information in a SharePoint Designer Workflow email activity that was associated with a “Person or Group” column in a list. I downloaded and installed from CodePlex the “Useful SharePoint Designer Custom Workflow Activities” (http://spdactivities.codeplex.com/). The “Lookup user info” activity was very helpful.  There are also a number of other activities included in this download which I have not used including:

  • Send Email with HTTP File attachment – Allows sending emails with attachments retrieved using a web request
  • Send Email with List Item attachments – Allows sending list item attachments as files attached to an email
  • Start Another Workflow – Starts another workflow associated with a list item
  • Grant Permission on Item – Allows granting of a specified permission level on a specified item
  • Delete List Item Permission Assignment – Allows deleting of the specified permission level assignment for a given user
  • Reset List Permissions Inheritance – Removes any unique permissions assigned to an item by inheriting list permissions
  • Is User a member of a SharePoint group – Checks if a given user is part of a given SharePoint group
  • Is Role assigned to User – Checks if a user role is already assigned on the current list item
  • NEW! Copy List Item Extended Activity – Allows copying/moving list items and files across sites.
  • NEW! Send Email Extended – Enhanced version of the OOTB activity. Allows you to specify the sender. Also does not break links in body.

Thanks to Paul Kotlyar and others for providing these valuable activities.

read more
Tim CoalsonCustom Workflow Activities
limit.jpg

SharePoint Workflow Limitations

Kirk Liemohn is a Principal Software Engineer at ThreeWill. He has over 20 years of software development experience with most of that time spent in software consulting.

Before deciding to go down the SharePoint Designer workflow path, you might want to understand these edges as you may have to do more work to create the solution.

Nearly all of these limitations listed further below can be solved through one or more of the following techniques:

  • Create a Visual Studio 2005 workflow instead and connect it to the SharePoint list.
  • Create a SharePoint list event and handle all of the needs within the event.
  • Create a SharePoint list event and initiate a workflow from the event.
  • Create custom SharePoint Designer Actions or Conditions.

Limitations

The limitations below are listed in relative priority with the most important or most likely to be encountered toward the top.

  • You cannot access the previous value of a field. This means that you cannot check to see if a field changed. There is an action that waits for a field to change, but you must provide the value that it changes to. Alternatively you can compare it to another field, but not the previous value of that field. If the field didn’t change at all but met the condition implied by the action, this wait action likely wouldn’t wait at all and move on the next step in the workflow.
  • Workaround: Use a SharePoint list event to track “ItemUpdating” and pass in the “After” value for a field (the current value will be the old value in a synchronous updating event). If you decide to also start this workflow from any asynchronous event (e.g., “ItemAdded” and/or “ItemUpdated”), you will need to pass in the event trigger (e.g., “Add”, “Updating”, “Updated”) so the workflow can differentiate between them (the current item in the workflow will be the old item for synchronous events, but it will be the new value for asynchronous events).
  • You cannot loop. If you want to perform an action on say all items in a list or all child items for a parent, you simply cannot do it unless you know how to lookup each item in the list at design time and have an action for each of those items.
  • Workaround: Use Events or a Visual Studio 2005 workflow.
  • You cannot lookup an item using two keys. If one key does not uniquely identify an item, you are stuck. You can try to just use one field, but the workflow will act on the first item it finds. You cannot use two fields to identify it.
  • Workaround: Use Events or a Visual Studio 2005 workflow.
  • You cannot copy the contents of one email action to use it within the same or another email action. This is true if there are any lookups within the email contents.
  • Workaround: Copy by hand (re-write the contents) or after saving the .xoml file, open it with an XML editor (right click the .xoml file and choose Open With -> SharePoint Designer (Open as XML)), then copy/paste the appropriate data.
  • You cannot put lookup information in the subject of an email.
  • Workaround: The easiest workaround is to put the lookup information in the email body. More complex solutions involve creating a custom SharePoint Designer workflow action, using a Visual Studio 2005 workflow, or sending the email from an event.
  • You cannot group logical conditions within a step by using parenthesis.
  • Workaround: Modify your expression such that the order takes precedence. For example, instead of “x=1 and (y=2 or z=3)” use “y=2 or z=3 and x=1”. .
  • You cannot easily log a value with context information to the workflow history list.
  • Workaround: Use the Build Dynamic String action to store your log into a workflow variable then use the Log to History List action to log the workflow variable to the history list.
  • You can run actions in parallel, but you cannot run steps in parallel.
  • Workaround: Use a Visual Studio 2005 workflow.

Tips

  • Other than the workaround tips mentioned above, there are some things buried in SharePoint Designer workflows that are possible, but not obvious.
  • You can relate to lists once or more removed from the current list. For example, you can use the current item and lookup to a related list and use that item to lookup to another list (or maybe a different item in the original list).
  • You can build dynamic strings or calculated values and put them into workflow variables then use those variables to set list items. Note that the calculations are simple: plus, minus, multiply by, divide by, mod.
read more
Kirk LiemohnSharePoint Workflow Limitations
workflow1.jpg

SharePoint Designer Workflows – Logical Expressions

Kirk Liemohn is a Principal Software Engineer at ThreeWill. He has over 20 years of software development experience with most of that time spent in software consulting.

SharePoint Designer workflows allow several conditions to be specified for a set of actions. Each condition results in a logical value (true/false) and can be ANDed or ORed with other logical conditions.

Here is an example set of 4 conditions. If they result in a logical true, the actions (not shown) are executed.

If Property1 equals Initiation: Init1
and Property2 equals Variable: Var1
or Property3 contains abc
and Property4 not equals xyz

Logical Operators/Expressions

The only logical operators are AND and OR. There is no NOT, but this can probably be handled within each conditional expression itself.

There are several conditional expressions: equals, not equals, is empty, begins with, matches regular expression, etc.

Grouping/Priority

The main drawback is that there is no way to group the logical expressions. There is no way to put in parenthesis. So, if you want to do “x=1 or (x=2 and y=3)”, you have to do a workaround. But first, you need to know the priority of each condition.

The rule is that precendence is based on the left-to-right order of the expression. So, “x=1 or x=2 and y=3” is equivalent to “(x=1 or x=2) and y=3”. The table below shows a couple of examples of how to rearrange your expression without grouping functionality. The letters A, B, C, and D represent a single logical condition (e.g., x=1).

Desired ExpressionActual Expression
A or (B and C)B and C or A
(A or B) and (C or D)A and C or A and D or B and C or B and D

Looking at our original example, the grouping is effectively:

If (((Property1 equals Initiation: Init1
and Property2 equals Variable: Var1)
or Property3 contains abc)
and Property4 not equals xyz)

read more
Kirk LiemohnSharePoint Designer Workflows – Logical Expressions