I downloaded Microsoft's Employee Training Schedule and Materials template and installed it. Everything works as I need it to except for one bug, which seems to be well documented. When you register for a course the amount of filled seats increases by 1. When you unregister, it should decrease by 1 but doesn't.

I followed the workaround http://paulgalvinsoldblog.wordpress.com/2007/10/11/employee-training-schedule-and-materials-template-decrement-bug-in-the-template/ to try to fix it, but it doesn't decrement the seats either. I also tried a slightly different workaround, but still no joy.

Anyone have any ideas?

EDIT: Ok I put a few log messages into the workflow to determine the problem. Here is the workflow as it looks now:

enter image description here

And how the history reports it:

enter image description here

So You can see that Variable:calc is originally set to 0. And Courses:Filled Seats doesn't seem to be getting set. So I can only assume this is a problem with the lookup. This lookup for Courses:Filled Seats looks like:

enter image description here

And the lookup for Registrations:Course ID looks like:

enter image description here

Is there anything there that people can see that might be causing the problem?

  • Hi. Couldn't it be a permissions issue? Try checking the permissions for the hidden Workflows list, they're not inherited and users could simply fail to launch the decrement workflow. Commented May 18, 2011 at 4:45
  • No the workflow is launching, as everything else in it is being performed correctly. Commented May 18, 2011 at 7:53
  • Run the step in the workflow with impersonation to get around the permission issue. Commented May 18, 2011 at 8:25
  • Using MOSS 2007 so impersonation isn't an option. But How can it be a permission issue when the rest of the workflow works correctly? Commented May 18, 2011 at 8:27
  • Do you say that the Workflow Status column is Completed on the items that trigger the workflow? I would suggest logging the calculated value to history and try to catch any edit conflict that could arise. Commented May 18, 2011 at 9:07

3 Answers 3


I was able to get the linked work-around working without issue. So I would guess a step was either missed or done just slightly wrong in following those instructions. So I will go back through them and highlight potential tricky spots:

  • Using SharePoint Designer 2007, open your Training site
  • Expand Workflows > Attendee unregistration and double click Attendee unregistration to edit the workflow
  • Under Actions, choose Do Calculation
  • Click the first value link and then the fx button
  • Change Source to Courses
  • Set Field: (In Lookup Details) to Filled Seats
  • Set Field: (In Find the List Item) to Courses:ID
  • Click the fx button next to the Value: text box and choose Source: Current Item and Field: Course ID

Find List Item Value

  • Your value lookup should now look like this: enter image description here

  • Back on the Do Calculation step click the underlined plus and change to minus

  • Click on the second value link and type 1 in the textbox
  • Under Actions, Choose Update List Item
  • Click on the this list link
  • Change the List: to Courses
  • Click the Add... button
  • Set field: to Filled Seats
  • Press the fx button next to the value: text box
  • Choose Source: Workflow Data and Field: Variable: calc (or whichever variable you stored the Do Calculation action in)

enter image description here

  • In the Find List Item section set Field: to Courses:ID
  • Click the fx button next to the Value: text box
  • Leave Source as Current Item and set Field: to Course ID
  • Your Update List Item window should now look like this:

enter image description here

  • VERY IMPORTANT: Hover over each action and in the dropdown menu that appears choose Move Action Up. Do this until the second action in the list is your Do Calculation action and the third is the Update List Item action. Your workflow should look like this:

enter image description here

  • Don't know how I missed this from 10 days ago! This is exactly how I have things laid out and it still doesn't work. :( I have +1 you just for the time and effort with the layout and pictures. If you have any other ideas I'd love to hear them. Commented May 13, 2011 at 13:54
  • By the way, try to add some logging in-between to see where the workflow fails. Commented May 18, 2011 at 4:46
  • @anothershrubery As a side note, answering this question led to an interesting issue the details of which can be found on Meta here: Mysterious Butt. The craziness of that made answering this totally worth it. Commented May 23, 2011 at 13:35

Check this out: http://sptrainingtemplate.codeplex.com/

This issue has been fixed by them you can install this template.

  • Ha! I installed that and I'm getting even worse problems! 1) The Total Seats doesn't decrease when you register for the course and 2) When you unregister, you actually don't! You can't seem to unregister even though it says that you have. Commented May 13, 2011 at 14:04
  • I can't even seem to open the workflow for Attendee Registration or Attendee Unregistration, it says "Failed to load workflow." I can open the Instructor Reminder workflow though. Commented May 13, 2011 at 14:06

Ok another "D'oh" moment from me. I WAS doing the lookup wrong as I expected.

I had the Registration:Course ID as

enter image description here

When it should have simply been

enter image description here

Everything is now working correctly.

No documentation anywhere described how to set the list item in "Find the List Item" and being new to SharePoint I was confused. Eventually worked it out though.

  • Nice to have the problem solved. Was it your own bug or that of the application template authors? Commented May 18, 2011 at 20:15
  • It was my own bug. I didn't know how to create the lookup correctly... Commented May 19, 2011 at 8:04
  • I'm glad your problem is solved. Unfortunately, I'm guessing you never actually reviewed/tried my answer since I described how to correctly set the lookup and included an actual screenshot similar to the one you are showing above a full two weeks prior to this answer. I spent quite a bit of time on my answer so it's frustrating to know it was dismissed without serious review. However, my end goal was to help solve your issue, and since your issue has been resolved, regardless of how, I'm glad. Commented May 23, 2011 at 13:34
  • @theChrisKent - I'm sorry, I looked over your answer over and over again and thougth I was copying it to a tee, but just always seemed to miss this lookup issue. I don't know how I missed it! I have now marked your answer as the correct one. Sorry for the annoyance. Commented May 23, 2011 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.