tips-wood.jpg

How to Get Nintex Workflow to Work with the ‘Modern’ SharePoint List

As I’m sure many of you are aware, the SharePoint team has been rolling out what they’re calling the ‘Modern’ SharePoint experience, and I wanted to share a recent (and mildly painful) experience I’ve had. The most recent update (at least the most recent that I’ve noticed) to my client’s tenant introduced the new ‘modern’ List UI.

On my client’s tenant, I have a dozen or so Nintex workflows running on a particular site. Many of these workflows contain at least one action that results in a new URL being generated, mainly through the use of the ‘Office 365 Create List Item’ action. Once the new list item has been created, the Nintex action conveniently stores the URL in a variable that I can then use for other purposes.

This is where the issues begin. The URL that the workflow stores will look something like…

https://<>.sharepoint.com/site/foo/lists/bar/DispForm.aspx?id=1

The issue is, though, that the ‘modern’ SharePoint UI treats querystring parameters as case sensitive, and it’s looking for the ‘id’ querystring to be ‘ID’. If you try to use the URL, you’ll end up staring at a mostly blank page. That’s obviously a problem when your workflow ends up sending out that link.

If your tenant is already using the modern UI, you can test this yourself. Just go to any list item, right-click on it and choose ‘Get a link’. Copy the URL from the text box to your clipboard, and then paste it in the browser’s URL bar. Before pressing enter, you’ll have to change the querystring to lowercase. After doing that and pressing enter, you’ll see the ‘blank’ screen I mentioned earlier.

Fortunately, this is pretty simple to defend against (provided you know the querystring) using the Regex action and replacing ‘id=’ with ‘ID=’.

Hopefully, this helps someone else out there…

Leave a comment below if you have anything to add.

read more
William HollandHow to Get Nintex Workflow to Work with the ‘Modern’ SharePoint List
simplify-simplify.jpg

Process Simplifies 700 Workflows to 80

Danny :Hello and welcome to the ThreeWill podcast. This is your host Danny Ryan. Today I have Sir Eric Bowden here with me. Hello Eric, how are you doing?

 

Eric:Hey Danny, I’m doing great. Glad to be here.

 

Danny :I just knighted you, how about that?

 

Eric:That’s awesome. That’s fantastic.

 

Danny :Well, thanks for joining me in here. It’s late in the day so I’ve got my coffee right here beside me in case I start falling asleep. Hit me on the back of the head if I do, as well.

 

Eric:That’s right. It’s dim in here.

 

Danny :It is. It’s nice and relaxed.

 

Eric:It’s chill.

 

Danny :Yeah, it’s a little hot though. I guess they started turning the heat on and now it gets too hot.

 

Eric:That’s true.

 

Danny :Today, let’s just catch up. Let’s talk about one of the recent projects that you’ve been on. I know when we were talking a little bit earlier about it, you were saying, “Well it’s more process related than technology.” I’m like, “Babe, we talk about process all the time on this podcast. It just happens to be one of the ways that projects are successful, and usually the key way that a project is successful.” No issues with talking about process.

 

Eric:That’s right, that’s right.

 

Danny :Give me a little bit of background on the project. I know we’re not going to bring up the client name because just keep it anonymous, but just give me a little bit of background on the project itself.

 

Eric:Sure, sure. Yeah, and I think as I introduced … You and I were talking about it … I think years ago coding, programming, that was my hammer that I hit every nail with. As time goes on, process has really become my hammer. Not that many people know that, but that’s where I think that’s where the most challenges are on projects are around process. It’s more around identifying what needs to get done and tracking our progress toward that goal, and making good decisions as we’re progressing along. This particular project … It was a little bit of a mix of process and technology. There’s some engineering tasks, but it was a project that had started.

 

The client had been working on it internally for probably in the neighborhood of three or four months. It really didn’t have a lot of process around it. There were things that they maybe thought they were accomplishing, but really wasn’t being tracked. Just not really a feedback loop on the project. I got involved just maybe about a month ago now. They had a concern at the time was really more around architecture. This is a portal site. They use it to communicate with external entities and there were about 39 of those external entities, so they were going to have 39 portal sites. They’re using Nintex workflows for various purposes. The design path they were going down was leading toward a number of workflows in the neighborhood of about 700.

 

Danny :700 separate workflows?

 

Eric:Separate workflows. I’m looking at you to let that sink in. Exactly.

 

Danny :Really?

 

Eric:Yes. The project manager there recognized that, “Hey, wait a minute. I think we might have a problem here. This is going to be a maintenance issue down the road if you have that many workflows.” We had been working with this client, great relationship for years. They contacted us to come in for an architecture review. That’s how this started was an architecture review. This really wasn’t … We weren’t thinking process at the time, so I take a look and I say, “You know, recognize some updates that could be made. There’s some libraries and some workflows that can be combined and so forth.” We ended up with two workflows per site, per 39 sites, to make it-

 

Danny :Oh, I thought you were per 350 sites.

 

Eric:No, no, no.

 

Danny :I was like, Eric, well done.

 

Eric:Per 39. From an architecture standpoint, resulted in a net gain.

 

Danny :Where we’re down to 80.

 

Eric:Yeah, which is good. That is a reasonable amount because there’s some benefits to multiple copies of these workflows. That comes into the fact that the downside is that you have to change it across 39 sites, but the upside is that you can change it to one site without having an impact on all the others. That was a reasonable place to land, and the customer … I work collaboratively with the team so we had some really sharp folks, professionals on the team to work with. We all arrived at these enhancements together, but where that led to … It’s where I naturally gravitate toward, is thinking about how are we going to get this project to the finish line? What is this project? Where are we trying to go? How are we going to get to that end result? What we do to achieve that is we start building a product backlog. We’re into scrum process. I started building out a product backlog. My desire is …

 

I just love to see projects complete and fulfill their mission. That’s really where I was heading toward was hoping that the client would engage us so that I could help bring this project to the finish line. Ultimately that’s what happened. It was really a great way to lead in to an engagement. We started and it was a collaborative team. Me working with from a process side, from coming to architecture and a tech lead side. Helping them get to the finish line. They had engineers. They have a product owner and a QA tester. They had been working on the project previously and they continued. Just really an experienced team, so they just really merged in with the process right away.

 

Danny :Nice, nice. You like finishing things. You and Tommy would get along.

 

Eric:Yeah, yeah, we do, we do. We are such … I think of myself as a closer.

 

Danny :Yes.

 

Eric:And too, an obsessive degree sometimes.

 

Danny :I’m nothing without you guys. I need your help to finish things off.

 

Eric:You have that entrepreneurial spirit. You’re the opener of the possibilities-

 

Danny :It drives me as nuts as it probably drives you guys though.

 

Eric:It doesn’t me because I’m such a natural closer that I have to seek out those that want to open up and take some risk and so forth.

 

Danny :Always be closing Eric, always be closing.

 

Eric:That’s all right, that’s all right. No problem. I can’t help it. I can’t help it. Anyway, it’s been a … We’re just about a week from being ready for user acceptance testing.

 

Danny :Nice.

 

Eric:Yeah, it’s just been a really great experience.

 

Danny :Did you use two week sprints or longer sprints? What did that look like?

 

Eric:Yeah, we were on one week sprints for a short project like this, which I think it was about six weeks in total. We like short feedback cycles, so it’s just one week sprints. Of course, we have daily stand-ups. That’s an even tighter feedback cycle. Our tester was pretty much active. We were releasing builds, of course during the sprint. You don’t want that sprint reviewed and be the first time that you’re features are being tested or that your product owner is putting their hands on the end result. We had a very active product owner who was right behind the QA tester accepting the results. Really a neat model project for I think how a process can really make a big difference.

 

Danny :Did you feel like the project was building momentum once … Typically when you come in on a project that’s floundering you’re just looking for something to build some momentum to get you going in the right direction. Did you feel that way with this project? How did this end up?

 

Eric:That’s a really good point. I would agree that that is the case on a lot of projects. This particular one, and I pointed this out to the team, … I will tell you that within the first week the product owner was just amazed at the results. I know I’m patting my own back, but that was the feedback that I was getting.

 

Danny :Well you’re Sir Eric Bowden so you can pat your pack as long as you want to. Geez.

 

Eric:The reply that I gave was and it’s true, is that while this project was floundering, which it did for … Let’s see, gosh, in the neighborhood of six, well it might have been as long as six months. While that was occurring, what they were doing was they were refining the requirements. Now that you know the technology side was in the implementation side and the progress was zigzagging back and forth, but they were coming to a better conclusion as far as what they actually wanted. When I started, we didn’t have a lot of understanding requirements of them deciding what they wanted to do. That had already really been firmed up. That was a fantastic springboard really for me when I got involved and got the team organized and turned in a little bit different direction. It was just a fantastic springboard for us to really make great progress in the first week.

 

Danny :Nice, nice. Anything else that was unique about this project at all?

 

Eric:It was a decent combination of out of the box configuration with a little bit of app dev. There’s a little bit of custom code in the background for copying files, but mostly out of the box configuration and Nintex workflows. That allowed me to really … I’m the coder so I’m doing some coding on the project and then we had another engineer who was doing more the configuration. That was a good aspect of the project was being able to divide up and say, “There’s a ton of work that needs to be done here and it’s all configuration, and then it was less work needed to be done that was coding.

 

Danny :Was that another ThreeWiller? Who was that? Was it someone from their team that was helping?

 

Eric:Doing the-

 

Danny :Doing the config.

 

Eric:The configuration yeah. That was an engineer from the customer who had been involved actually to a lesser extent on the project as a head, you know initially started, and then that person became more involved.

 

Danny :Did we do the QA or did they do the QA?

 

Eric:No, it was their QA team. They had an engineer doing the configuration, performing the QA, and a product owner. Then me from the process and coding standpoint. We did have a ThreeWiller joined for a little bit for some of the Nintex Workflow support that was really useful. We had a couple of folks here who were doing Nintex workflows and just great to be able to add them all to the team briefly.

 

Danny :About to say, you sound like a one man turnaround artist. I don’t know if you want to do that for every project. You’re like, “Ah, this is just …” It can wear you out coming into one that’s floundering and trying to … That’s tough stuff. What project here at ThreeWill is easy? I’d like to see that one. I don’t know if we take on those types of projects around here.

 

Eric:I don’t know, I don’t know. It’s a finish line. You show me a finish line and that energizes me. It’s hard to turn it away honestly. I enjoy it. I love those kind of projects.

 

Danny :Well you’re awesome. We are so lucky to have you here Eric.

 

Danny :Appreciate you filling us in on this project. Love all the stuff you’re doing. I tried to slow you down with stuff about trove and channel but you just … I’m trying my best to slow you down but there’s no slowing you down man.

 

Eric:I own the target.

 

Danny :Well thank you for taking the time to do this Eric.

 

Eric:Sure Dan. Thanks for letting me.

 

Danny :I really appreciate it. Thanks everybody for listening. Take care, bye bye.

 

read more
Eric BowdenProcess Simplifies 700 Workflows to 80
just-start.jpg

Getting Started with Nintex

I’ve recently had the opportunity to work on a small project that involved using Nintex workflows. This has been my first ‘real’ exposure to Nintex and I’ve found it to have some really cool features that you can’t find when working with regular SharePoint workflows. I thought I’d share several of them with you today.

Email Attachments

Woohoo! You can attach a document to an email notification! What a lovely thing this is. For this project, we needed to be able to email a PO to the vendor after it was uploaded into a document set. This isn’t possible with out of the box SharePoint workflows, but is extremely easy with Nintex.

Once you add a Send Notification action to your workflow, it’s as simple as clicking the Add Attachment link.

In my case, I needed to send the file the workflow was being run on, so I used the Item Property called ‘Encoded Absolute Url’ to pick up the URL for the selected file. A bonus is that you can add as many attachments as you like. You can do this by specifying multiple URLs separated by a semicolon, or by loading all your URLs into a collection variable and using that instead.

nintex

TIP: And while we’re talking about email notifications, there’s one slightly annoying option that is turned on by default, but luckily has a setting that will give the developer full control over it. When an email is generated, it automatically adds a header and footer to the email body around your text.

To turn this off, you have to go into Central Administration and click on the Nintex Workflow Management link found on the left navigation bar. Then select Global settings and scroll down until you see the option for ‘Enforce message header and footer.’ This defaults to Yes. Change it to “No” and then you do an IISReset to make the option active. Once reset, a checkbox will be displayed at the bottom of the configuration screen for the Send email action, allowing you to decide if you want to include the header and footer in this particular email. For emails going out to external folks, you probably would not want to include the system generated header and footer, but only have your custom content.

Query List Action

This is another very handy tool in the Nintex Workflow Actions set. I found it extremely helpful when working with a document in a document set. I not only needed to attach the document to the outgoing email notification, but I also needed to include some of its metadata in the email body itself. Since it is a member of a document set, its metadata is populated by ‘shared columns’ from the document set parent. This is really great, except that the columns don’t surface as Item Properties, which would allow them to be selected through the Insert Reference screen.

So Query list action to the rescue! After much head scratching and false paths, I finally figured out that all I needed to do was query the ‘list’ (document library) this document was associated with (in this case, Purchase Orders), using the URL Path (internal name is ‘FileRef’) of the selected file. Duh!

By querying the library, I now have access to all the file’s metadata for my output. I simply select the fields I need and assign each to its own workflow variable.

But wait … that’s not all! What if your query is a little more complex than the query builder can handle? You’ll note in the above screen grab that there’s an Editor Mode option called CAML Editor. How cool is that? Once you’ve selected your basic query options, you can then change modes and go into the CAML editor and tweak the automatically built CAML query to your hearts content. For me, I needed to be sure the Vendor lookup field returned the Lookup Id instead of the Lookup Value, so I was able to add the ‘LookupId=”TRUE”‘ attribute to the Vendor field. I could then use the returned id in another Query list action to pull Vendor information from the Vendors list. Nice!

TIP: If you’re querying a document library, it’s very important you check the ‘Recursive’ box found just below the list dropdown on the Configuration screen. This will add the Scope attribute needed in order to query for the item within the folders and subfolders. If this is unchecked, the query will stop at the top level and will return nothing back. I wasted more time than I like to admit trying to figure out why my query was returning no results here, while it all worked beautifully in my CAML Query helper tool.

TIP: Or caution – If you customize your CAML query, you won’t be able to go back to the ‘Query builder’ editor mode without potentially losing some of your custom changes. For example, I can change a FieldRef value and it will likely stick, but adding the LookupId attribute to a FieldRef does not. But don’t worry! A big warning is thrown when you try to change back so you won’t inadvertently lose any important changes. When/if you click OK to proceed, any losses will be intentional. J

Regular Expression Action

I know that none (or mostly none) of us really like working with regular expressions, but we can’t deny that they are a very valuable and powerful tool. One of the very cool actions that you can add to a Nintex workflow is called ‘Regular Expression.’ Why would anyone do this you might ask? In my case, I needed to figure out what the parent folder was for a document in a document set.

By using this action, I was able to write (i.e. I googled it) a regex pattern that would pull the last folder from the selected file’s URL. The output returned from this action is in the form of a collection (an array of values) that can then be looped through to extract the data you need. I chose the Split operation for my needs, but there are several other operations available as well that I haven’t had time to play with yet.

After I had my data collection, I added a simple ‘For each’ action that looped through this collection looking for the data I needed – the folder name. This particular pattern returned the match in the second item, so I just looped to the first non-empty item, grabbed the folder name and exited the loop. Pretty nifty stuff!

I know I barely touched the surface here, so if you are looking for a deeper dive into the Regular Expression action and all the cool stuff it can do, see this excellent blog post.

And that’s all I have for now. Thanks for taking the time to read all the way to the bottom!!  Leave a comment below if you have any tips that you learned when first using Nintex or have a question about something I shared.

read more
Caroline SosebeeGetting Started with Nintex
reminder-emails.jpg

Sending Reminder Emails Using SharePoint Designer Workflows

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

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
approved1.jpg

SharePoint Workflow Approval by Only One Member of a Group

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
customer.jpg

Top 5 Reasons to Manage Customer Experience in SharePoint

Customer Experience in SharePoint

Customers interact with a business in numerous ways, whether browsing through the store or online catalog, asking questions in person or through email, purchasing product at point-of-sale or online and returning or exchanging merchandise after the sale. At each of these touch points is an opportunity to capture information about the experience your customer has with the process or people. Whether the customer experience is entered directly by the customer or via an astute employee, here are the top 5 reasons Microsoft SharePoint can assist with capturing this information:

  1. Lists provide a versatile repository for structured data

    SharePoint lists are the place to record the “who, what, when and where” of the customer interaction. As needs change, the list data can be enhanced, in place, to capture additional information about the customer experience without the need for data conversion or migration. Files attached to the list can help document the experience, whether they are photographs, email correspondence, or other content. SharePoint lists contain the “database” of customer information.

  2. Search for similar customer experiences

    Different customers often have similar experiences. SharePoint full-text search can be used to identify other related interactions to consolidate or remove duplicate information. Search can be executed interactively or programmatically depending on how it best fits the processing workflow. Results ranking can be used to allow the most pertinent results appear at the top of the results list. User experience can be greatly enhanced by integrating search results directly into the data entry screens, enabling search-as-you-type or search for duplicates at the initial point of data entry.

  3. Workflows allow for custom routing, review and approval

    SharePoint workflows are a method to automate, augment and enhance business processes. These workflows can send email notifications of newly added items, trigger approval steps as list items are reviewed and data is changed, and perform a myriad of other tasks, many without the need for custom programming, to support the business processes.

  4. Retention policies can trigger reminder emails or even archive older content

    SharePoint retention policies are triggers on list data or documents that occur when an item is deemed to have “expired.” Typical uses for retention policies include moving content to an archive repository when the content reaches a certain age and to send email reminders based on a number of days since the last interaction or the number of days an item has remained in a particular state or queue. Retention policies run once a week by default, but can easily be configured to run once a day.

  5. Integration with Microsoft Office

    A standard feature of SharePoint lists is the ability to export of data into Microsoft Excel. Additionally, Microsoft Access can read, query, process and report on SharePoint data, in real time, without the need to export and process the data locally. Microsoft Word can process Excel data, allowing for robust mail merge capability. Via the OpenXML SDK for Microsoft Office (software development kit) programmatic creation of Excel, Word and PowerPoint slides provide unlimited possibilities for presentation of customer experience data.

Summary

Microsoft SharePoint provides a rich out-of-the-box infrastructure for data related to customer interactions and experiences (as well as for many any other data-related needs.) The combination of list data, full-text search, workflows, retention policies and integration with Microsoft Office can cover a wide range of customer experience use cases, empowering your organization to streamline your business data collection and processing.

ThreeWill has the ability and experience to transform standard SharePoint lists and forms into enterprise level applications. Contact us to let us know how we can help you.

read more
Matthew ChestnutTop 5 Reasons to Manage Customer Experience in SharePoint
top-five-list.jpg

Top 5 Ways That Your Application Can Be Built on SharePoint in Office 365

Your Application Can Be Built on SharePoint in Office 365

Many SharePoint users who have moved their infrastructure to Office 365 are not aware of just how easy it is to amplify the benefit of SharePoint in Office 365 through the development of custom applications.  Custom applications can be a great multiplier for Office 365 because they uniquely tune the powerful feature set provided by the platform to your business.

There are a number of options available to create applications in Office 365.  The list below includes 5.  Many of these options are low complexity and require only site owner permissions.  Further in the list, the options become much more powerful and require additional permissions in SharePoint.

  1. ​SharePoint ‘Out of the Box’ Configuration

    • ​Example: ​Intranet site to allow users to easily find and watch training videos.
    • How to get started: You just need a SharePoint site and Site Owner permissions.
  2. Workflow Applications

    • ​Example: Multi-user process for creating and approving purchase orders and invoices.
    • How to get started: You need a SharePoint site, and you will need Site Owner permissions.
  3. Site Pages and Javascript Applications

    • ​Example: A site which presents training materials as videos or PowerPoint, with an associated quiz to facilitate learning.
    • How to get started: You need a SharePoint site and Site Owner permissions
      • Notice a pattern?  The first three techniques for developing custom applications are available for almost everyone.  These options are very powerful and can meet the needs of many complex business applications.
  4. Windows Desktop and Click-Once Applications

    • ​Example: Custom application which creates price cards for cellular phones, in PDF format, utilizing list data stored and approved in SharePoint.
    • How to get started: You will need a SharePoint site and site owner permissions.  Users who will use the click-once application will need to have privileges to install new applications on their desktop.
  5. SharePoint “Apps”

    • ​Example: Employee hiring and onboarding application for a major league sports team.
    • How to get started: You will need a SharePoint site, and you will need site collection administrator privileges.  You will also need an account in Microsoft Azure.  However, don’t get concerned about the need for Azure.  Azure is becoming more and more common across companies of all sizes, and it’s easy to get started if your company is not already using Azure.

Have you built on SharePoint or you are unsure if the application can be built in your Office 365 environment?  Contact us or comment below.


SharePoint is a web application platform in the Microsoft Office server suite. Launched in 2001, SharePoint combines various functions which are traditionally separate applications: intranet, extranet, content management, document management, personal cloud, enterprise social networking, enterprise search, business intelligence, workflow management, web content management, and an enterprise application store. SharePoint servers have traditionally been deployed for internal use in mid-size businesses and large departments alongside Microsoft Exchange, Skype for Business, and Office Web Apps; but Microsoft’s ‘Office 365’ software as a service offering (which includes a version of SharePoint) has led to increased usage of SharePoint in smaller organizations.

While Office 365 provides SharePoint as a service, installing SharePoint on premises typically requires multiple virtual machines, at least two separate physical servers, and is a somewhat significant installation and configuration effort. The software is based on an n-tier service oriented architecture. Enterprise application software (for example, email servers, ERP, BI and CRM products) often either requires or integrates with elements of SharePoint. As an application platform, SharePoint provides central management, governance, and security controls. The SharePoint platform manages Internet Information Services (IIS) via form-based management tooling.

Since the release of SharePoint 2013, Microsoft’s primary channel for distribution of SharePoint has been Office 365, where the product is continuously being upgraded. New versions are released every few years, and represent a supported snapshot of the cloud software. Microsoft currently has three tiers of pricing for SharePoint 2013, including a free version (whose future is currently uncertain). SharePoint 2013 is also resold through a cloud model by many third-party vendors. The next on-premises release is SharePoint 2016, expected to have increased hybrid cloud integration.

Office 365 is the brand name used by Microsoft for a group of software plus services subscriptions that provides productivity software and related services to its subscribers. For consumers, the service allows the use of Microsoft Office apps on Windows and OS X, provides storage space on Microsoft’s cloud storage service OneDrive, and grants 60 Skype minutes per month. For business and enterprise users, Office 365 offers plans including e-mail and social networking services through hosted versions of Exchange Server, Skype for Business Server, SharePoint and Office Online, integration with Yammer, as well as access to the Office software.

After a beta test that began in October 2010, Office 365 was launched on June 28, 2011, as a successor to Microsoft Business Productivity Online Suite (MSBPOS), originally aimed at corporate users. With the release of Microsoft Office 2013, Office 365 was expanded to include new plans aimed at different types of businesses, along with new plans aimed at general consumers wanting to use the Office desktop software on a subscription basis—with an emphasis on the rolling release model.

read more
Eric BowdenTop 5 Ways That Your Application Can Be Built on SharePoint in Office 365
insurance.jpg

Top 5 Ways an Insurance Company Should Leverage SharePoint

As a consultant, I have the unique opportunity to work with all sorts of customers in all types of industries to help them leverage SharePoint and build on its existing capabilities. I wasn’t always a consultant though and have also spent a large portion of my career working at Fortune 500 Insurance and Financial Services companies. As an employee and a consultant, I’ve been able to roll out SharePoint to companies that are in the Insurance sector, and I feel it has given me a unique insight into the features and capabilities that add the most value when trying to leverage SharePoint.

These are the top 5 capabilities I think apply to all insurance companies:
1. Records Management
2. Change Management
3. Process Management
4. Knowledge Management
5. Search

Records Management

Let’s face it, even now in 2015 documents are a still a part of life; and if you work at an insurance company, you certainly know that to be true. Whether it’s policy holder information or claim information, there is a high likelihood that not 100% of it is digital in its entirety. Wouldn’t it be nice if when it reached its final state it was stored as a digital record? A record that you could define retention policies for and have at the ready for compliance, auditing or litigation support needs. Whether it’s a document that was received via snail mail and scanned or one that started out as an electronic form, you could define a file plan in SharePoint to handle it. SharePoint can be a great records management solution for other types of media, too. So you can define policies for all types of files including media like audio and video so that those types of files can have their own retention policies, too.

Change Management

Whether you are a customer service representative on the phone, a sales agent out in the field or a back office employee in claims or policy management, you need to understand the policies and procedures that apply to your job. In today’s business these policies and procedures are likely to change more frequently than ever. They can change because laws change, health care rules change as your business adapts and improves its processes to become better and more efficient. While change is unavoidable, if you are in an insurance company, you want to have control around how and when you respond to change; you want change management.

Change Management around policies and procedures is an example of a perfect fit for SharePoint. The Enterprise Content Management features in SharePoint are flexible and robust and allow you to control content dissemination on your terms. In larger more controlled scenarios, you can use document management capabilities to establish workflows and approval processes to ensure changes are fully vetted and approved before being communicated to employees who are working with customers. In less mission critical scenarios where change is more rapid and the need for tight controls are not necessary, you can dial the knobs back and use a more collaborative approach to information sharing and dissemination with features like wikis, discussions and newsfeeds.

Process Management

Just as every company has different approaches to a Change Management process they likely have many different processes. These processes can even differ between parts of the organization. For example, the workflow process to onboard someone in IT will likely be different than the process to onboard a customer service rep or a claims rep. SharePoint has robust workflow capabilities that have been around since 2007 and have gotten better and more flexible with each release.

While onboarding is an obvious workflow scenario that everyone mentions, where I think SharePoint can really shine for the insurance industry/sector is in all the smaller departmental and divisional processes that get overlooked because they aren’t used by the whole enterprise. Workflow in these areas provides value because it can be the tool to create something repeatable out of what is often tribal knowledge. In many insurance departments that I’ve worked with in the past, the first part of joining the team entails long orientation and training sessions. Certainly much of this is important training on industry and regulatory information, however,much of it is also trying to disseminate that tribal knowledge on how the departments work. Wouldn’t it be nice if you could build these processes into a system where everyone could follow them more easily?

Another great thing about using SharePoint workflows for process management is that you can invest as little or as much as you feel is needed to support your particular process. You can use many out of the box workflows like approvals, and signatures or you can build your own in a WYSIWIG editor called SharePoint Designer. If those don’t fit the need you can go so far as to develop a highly customized workflow using Visual Studio or even other 3rd Party tools.

Knowledge Management

In Insurance, just like any industry, your people and more importantly the knowledge they bring is a critical part of your business. At times, it can be a challenge to know who has what information, especially as a business grows or as employees move from job to job within the organization. With SharePoint you can leverage many capabilities to help provide a place to go for those that have questions.

I have helped many departments both large and small, create knowledge bases with features like Frequently Asked Questions (FAQs), discussions, documentation on processes and so on. Since all this information is also tied into the user answering questions and providing the information, it’s easy to know who is knowledgeable on a particular subject no matter where they are (or who they are) within your organization.

The challenge I often see with knowledge management is getting if off the ground and getting people who are busy with their own work to participate. Many times a reward or recognition system for contributing helps get people to engage and build a community of knowledge that will benefit everyone.

Search

Really no solution that provides the ability to create and store so much digital content would be worth as much without a very robust search engine. How valuable would the internet be to us today if we couldn’t google for the things we didn’t know already? Search in SharePoint is powerful and flexible and can really be tuned to your needs. It has grown and has been improved in each release. When Fast Search was incorporated, it really reached new heights. It’s often referred to as conversational search, and if you’ve invested in getting your content into SharePoint this type of search will make a lot of sense. I think a scenario is the best way to describe its value.

Imagine you search for the word “policy manual” and get back a list of 1000 items. That’s probably more items than you were prepared for, but you know it’s a document, so you click a refiner to get just documents and maybe another because you know the policy manual was just updated this week. Suddenly you are down to a much more manageable list of items. Items that you can mouse over and get a preview of the contents and the author, location in SharePoint and more.

The scenario above is really just the “out of the box” scenario, the great thing about SharePoint is the ability to be customized Search is no exception. You can change how results and refiners are shown, change how things are previewed and add previews for other types of files. Of course, you can also configure search to find content that is not even in SharePoint; so that it’s the Google for your company with the ability to show results across many line of business systems in a single place.

Summary

I hope you have gotten some ideas out of my top 5 list – please feel free to leave a comment below if you have something to add to the list. It comes from my personal experience and is really just the tip of the iceberg for the uses for SharePoint. One of our passions at ThreeWill is being able to listen to customers, take their needs, and map them to the right SharePoint features. We would love to hear from you and help you make the most of your investment in SharePoint.

read more
Bo GeorgeTop 5 Ways an Insurance Company Should Leverage SharePoint
check.jpg

Updating the Task Approval Form for the “Out of Box” SharePoint Approval Workflow

I was recently working on a project where the customer wanted to use the default SharePoint Approval workflow, but they wanted to include some additional information on the Task Approval form so that the “approver” did not need to navigate back to the SharePoint Document library to get the key information required to approve or reject the request. In this particular scenario, the customer wanted to add the Vendor name and the Invoice amount fields. Having customized Approval forms in the past that were related to SharePoint custom lists, I thought this would be relatively straightforward; it turns out that the process is a bit different between lists and document libraries.

To get started, you will need to open SharePoint Designer and navigate to the appropriate SharePoint site. Next, navigate to the Workflows folder and make a copy of the Approval – SharePoint 2010 as demonstrated below. SharePoint 2010 workflows run in both 2010 and 2013 environments.

Right-click the Approval-SharePoint 2010 workflow and select Copy and Modify. Add the name of the workflow (in my case, “Demonstrate Custom Columns on Approval Form”) and select the Content Type. In this scenario, I am associating this approval workflow with a custom Document Set content type called Custom Document Set.

After providing the workflow name and associated content type, click OK to save the new workflow. I also recommend publishing the workflow at this point so that it will go ahead and generate the default InfoPath Approval Form. Note that the default name of the InfoPath form will be ugly. I won’t go into detail in this blog, but there are ways to manipulate this name in the associated .xoml and xoml.wfconfig.xml workflow files prior to publishing the workflow so you can have a nicer name.

Having created a copy of the “out of box” Approval workflow and published it, we can now edit the workflow. Click the name of the Approval task as highlighted below.

You will see a Task Form Fields section in the top-right of this screen. Here we want to add two new Task Form Fields by clicking on the New button.

Add a field called Vendor as a single line of text.

Next, add Invoice Amount as Currency.

After completing these steps, publish the Workflow again to persist these changes. This has basically added two new fields to the task content type associated with this Approval workflow.

Next, we need to open up the task approval form and add the new fields. Click on the form name to launch InfoPath where we can edit the form.

After the form opens in InfoPath, right-click the Status column and select Insert Row above.

After the new row has been added, enter the Vendor text in the label column.

Next, in the data area of the form, add the Calculated Value object from the Controls list as demonstrated in the 2 screen shots below.

To see the Calculated Value option, select the small arrow in the bottom of the controls list.

After clicking this arrow, you will see the Calculated Value option as demonstrated below.

Next, select the Vendor field from the Fields list as demonstrated below. This screen shot displays the culmination of having clicked the “fx” button and selected the “Insert Field or Group”. Select the Vendor option.

Repeat these same steps to add the Invoice Amount column to the form. For the Invoice Amount column, you can choose to display the value formatted as currency as show below.

Publish the updates to the form by clicking the blue “up arrow” in the top of the InfoPath form.

Allow InfoPath to save a local copy as part of the Publish process as shown below.

You should receive a message indicating the Publish was successful.

At this point, Publish the workflow again so that the updates to the InfoPath form are saved with the Workflow.

Now that we have added fields to the task content type and updated our InfoPath form to display those fields from the task content type, we need to populate those task fields within the workflow.

Edit the Workflow and click the Approval task name as demonstrated below.

Next, select the “Change the behavior of a single task” option.

In the “Before a Task is Assigned” section, add a “Set Task Field” action. Select the Vendor field from the list of Task fields and select the Current Item: Vendor field from the fields displayed in the Current Item. Basically this is populating the Task field called Vendor with the Vendor value from the Current Item before creating the Task. Repeat the same steps for the Invoice Amount field.

Publish the workflow again to persist the changes to the workflow.

Now when you run the workflow and an Approver opens up the Task Approval form, they will see the new Vendor and Invoice Amount fields populated which will help them decide to Approve or not.

One limitation of this solution to point out is that the values on the Task Approval Form are captured at the time the workflow runs and are not dynamic. So, if these values are changed in the document library, the changes will not be shown in this form. The rule of thumb should be that any changes to the underlying data in the document library should prompt any running Approval Workflows to be cancelled and a new one started. This would make sense since approvers in a multi-step approval process may have already approved based on the original values.

read more
Tim CoalsonUpdating the Task Approval Form for the “Out of Box” SharePoint Approval Workflow
waiting.jpg

Waiting for Change in a Workflow

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
weird-strech.jpg

Sharepoint 2013 App Workflow – More Weird Parts

Sharepoint 2013 App Workflow Weird Part #2: DynamicValue is more dynamicky than you might think

Let’s start the story with a look at REST calls. SharePoint 2013 Workflows include a HttpSend activity that can be used to make REST calls (as an aside, I’ve found it to be more flexible and dependable than some of the native workflow activities when it comes to manipulating SharePoint data). The basic recipe for making a REST call from a SharePoint 2013 Workflow looks like this:

  • Use an HttpSend activity to call to the REST endpoint (Note that if you’re doing POSTs, you will need a Form Digest; see this article for more details)
  • Use an If conditional activity to confirm an HttpStatusCode of OK
  • If OK, then use ParseDynamicValue activity to convert the JSON response into a DynamicValue object
  • Use GetDynamicValueProperties activity to read values into variables using paths

With a little practice (and perhaps a well-placed query or two to your search engine of choice) calls like this will become second nature. However, sooner or later something unanticipated happens. In particular, what happens if the returned result is an array of values?

Thats exactly what happened to me. I had a scenario where I issued a REST query to get back all the members of a SharePoint group; naturally, those values are returned as an array. Here’s the query I issued:

_api/web/sitegroups/getbyname('{group name}')/Users

And here’s the JSON result that came back:

{"d":
     {"results":
          [
               {"__metadata":
                    {"id":"http://app-38fea3cc91f3d1.labsdevapps.local/AbsenceandVacationManagement/_api/Web/GetUserById(1)",
                    "uri":"http://app-38fea3cc91f3d1.labsdevapps.local/AbsenceandVacationManagement/_api/Web/GetUserById(1)",
                    "type":"SP.User"},
               "Groups":{"__deferred":{"uri":"http://app-38fea3cc91f3d1.labsdevapps.local/AbsenceandVacationManagement/_api/Web/GetUserById(1)/Groups"}},
               "Id":1,
               "IsHiddenInUI":false,
               "LoginName":"i:0#.w|labsdev\sp_admin",
               "Title":"SP_Admin",
               "PrincipalType":1,
               "Email":"",
               "IsSiteAdmin":false,
               "UserId":
                    {"__metadata":{"type":"SP.UserIdInfo"},
                    "NameId":"s-1-5-21-1407570785-1617640577-437752984-1105",
                    "NameIdIssuer":"urn:office:idp:activedirectory"}
               }
          ]
     }
}

Note the square brackets after the “results” node, indicating that we’re dealing with an array. So, clever guy that I am, I tried a couple of remedies:

  • Put the result in an Array of DynamicValue objects
  • Put the result in a Collection of DynamicValue objects

Sadly, both of these suffered the same fate: they would build, but would not deploy. So then someone much smarter than me made a suggestion, and the conversation went something like this:

Smart Person: “why not just put d/results into a DynamicValue object?”
Me: “Wait, WHAT?!?!”

Turns out Smart Person was right.

After performing our HttpSend activity, checking the status, and parsing the JSON response into our initial DynamicValue, we establish a new variable for containing our array:

Then, we use a GetDynamicValueProperties activity and read the array into our new DynamicValue variable:

We add a ForEach loop activity to iterate through the data:

Take note that we are not doing any kind of expression in what we are looping through, like .Keys or .Values.  (I actually tried that at some point);  we’re just telling the workflow to loop through each DynamicValue inside a DynamicValue, and it just knows what to do (quite odd, isn’t it?).  Once inside the loop, we can then path to our values out of our DynamicValue:

For those of you that like to plumb the depths for greater understanding, you can see Microsoft’s class definition to learn more about the behavior of DynamicValue; for those that just want it to work, remember the DynamicValue object can be used to to parse an array within another DynamicValue object (weird, RIGHT?).

read more
Mike HomolSharepoint 2013 App Workflow – More Weird Parts
weird-walk.jpg

Sharepoint 2013 App Workflow – The Weird Parts

Sharepoint 2013 App Workflow – Weird Part #1: WriteToHistory has some strange limitations

Generally the WriteToHistory workflow activity is used for one of two purposes:

  1. To leave a simple audit trail of messages for users of a workflow
  2. As a debugging tool for developers

If you’re like me, you have a WriteToHistory activity between almost every major step in your workflow to make sure it’s functioning correctly (although, let’s not forget to take those out before we go to production!).

Let’s look at the WriteToHistory limitation by considering a simple scenario:

  • We have a SharePoint-Hosted App
  • The App includes a single list (such as an Announcements list)
  • The App includes a Visual Studio-authored workflow that is triggered when an item is added to the list

Now, to demonstrate the problem at hand, let’s consider the workflow to be configured as follows:

  • The workflow consists only of a Try/Catch block
  • The Try block includes two WriteToHistory activities: one that writes a “short” message, and one that writes a “long” message
  • The Catch block simply notes any exception that occurs and uses a WriteToHistory activity to record the error

You can see this illustrated in the following figures:

Did I tip my hand there? Yes, the issue here is the length of the message being written. If one attempts to write a message that is longer than 255 characters the entire workflow crashes. No “Catch”… No error message… the workflow simply stops. (As an aside, really?!?!? This is 2014, do we still have to worry about 255 character boundaries?). On the other hand, if I go back and shorten the “longer” message to 255 or less then everything works as expected.

Obviously, we’ll need to make sure we cover our bases on this going forward: never allow a workflow to attempt to write more than 255 characters to the WriteToHistory activity. We can insure this by always calling a method on the string to trim or substring it to a length of 255 or less.

read more
Mike HomolSharepoint 2013 App Workflow – The Weird Parts
approve-pen.jpg

Configure SharePoint Approval Workflows with SharePoint Designer

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?

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?