in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Points-of-Sharing

All about SharePoint...

Employee Training and Scheduling Template - a couple fixes Part 1

The following is a walkthrough on how to manually adjust the default set of workflows built into the "Employee Training Scheduling and Materials" template to set the "Attendee Unregistration" workflow to work as intended.  By default, the workflow does not increment the "Available Seats" variable when a user un-registers from a course, which can lead to issues in how many users can actually register if several "un-registrations" take place.

Walkthrough:

In SharePoint Designer:
File > Open Site
Open to the Employee Training Site
Expand WorkFlows, expand Attendee Unregistration and double click "Attendee Unregistration.xoml"
The Workflow Designer for "Unregister from course" should display.
And the Delete item in Registration flow should display. Click on Actions > More Actions
Double Click the "Do Calculations" to add it to the workflow.
Workflow Screen 1

Open the drop down menu for this item and move it up twice, so it’s the first item under "Delete Item in Registration"
Click the first "value" hyperlink and click the "fx" button next to it.
For the pop-ups, enter the information as follows:
workflow screen 2

Click the "fx" and fill out the following then click ok
workflow screen 3

Click on the "plus" hyperlink and change it to "minus"
Click on the 2nd "value" hyperlink and enter the number one (1).
Click on the "Variable:calc" hyperlink and select "create new variable" and enter a new name, make it a "Number" Type and click "OK"
workflow screen 4

The Workflow should now look something like this:
workflow screen 5

Click on the Actions button > More Actions and add the "Upldate List Item" action.
Move this action up so it is under the action you just created above.
Click the "this list" hyperlink
Change List to : Courses
Click Add to fill out the Value Assignment
workflow screen 6

Click "fx" on the "Value Assignment" to get the "Define Workflow Lookup"
workflow screen 7

Value Assignment should look like this:
workflow screen 8

Ok out of Define Workflow Lookup and Ok out of Value Assignment
For the bottom half, choose Courses:ID for the field and then click "fx" to lookup the Value:
worflow screen 9

The Update List Item should look like this:
workflow screen 10

Ok out of the screen.
The updated Attendee Unregistration Workflow should look like this:
workflow screen 11

Finish to complete. The workflow should build.


****Special thanks to milayen from SharePointU.com for providing me this walkthrough when I needed it most, and allowing me to reproduce it here for you.****

Comments

 

Points of Sharing said:

On the last post regarding this template (see Part 1 ), I gave a walkthrough on how to fix the "Available

September 19, 2007 4:34 PM
 

Blogger Loser » Blog Archive » Employee Training and Scheduling Template - a couple fixes Part 2 said:

Pingback from  Blogger Loser  » Blog Archive   » Employee Training and Scheduling Template - a couple fixes Part 2

September 19, 2007 5:03 PM
 

SharePoint 2007 link love 09-20-2007 at Virtual Generations said:

Pingback from  SharePoint 2007 link love 09-20-2007 at  Virtual Generations

September 20, 2007 3:48 AM
 

Links (9/20/2007) « Steve Pietrek’s SharePoint Stuff said:

Pingback from  Links (9/20/2007) « Steve Pietrek’s SharePoint Stuff

September 20, 2007 7:40 PM
 

Microsoft’s Fab40 training site solution, with a few tweaks inspired by Natalya from SharePoint Beagle « Slinger’s Thoughts said:

Pingback from  Microsoft’s Fab40 training site solution, with a few tweaks inspired by Natalya from SharePoint Beagle « Slinger’s Thoughts

February 28, 2008 10:02 AM
 

Mirrored Blogs said:

Fantastic 40 Employee Training and Scheduling Template - a couple fixes Part 1 Employee Training and

April 3, 2008 4:03 AM
 

Craig said:

It would be great if Managers could sign up their employees who do not have computer access.

ie: Manager1 logs in to Sharepoint and thinks Class would be good for user1, user3 and user4. Those users do not have company email or logons. How do we get them signed up?

April 9, 2008 5:42 PM
 

Snehal H.Rana said:

Dink,

Great post!! Quick question. How do I setup a workflow which sends an email to the employee confirming his or her unregistration?

Thanks

Snehal H.Rana

April 24, 2008 12:14 PM
 

dink said:

Craig,

Out of the box, registering other users is not supported since everything is designed to run under the context of the currently signed in user.

What you could look into is creating another custom list that takes in user names (a lookup of current site members).  Then attach a custom workflow that adds the user to the "Current Registrations" list on the addition of a new item to you rcustom list.

- Dink

April 24, 2008 6:07 PM
 

dink said:

Snehal,

Take a look at the email reminder workflow steps in the "Attendee registration" workflow.

You can basically duplicate it and include the steps into the "Unregistration" workflow.

- Dink

April 24, 2008 6:16 PM
 

Snehal Rana said:

Dink:

I tried doing that in unregistration, but there are no variable: subject as workflow data. Can you show some steps on how to do this. I don't need screenshots, but some basic steps will help.

Keep up good work.

Thanks

Snehal Rana

April 25, 2008 3:26 PM
 

dink said:

Snehal,

You'll have to manually create the variables you need in order to model it after the emai reminder portion of the workflow.

Here's a walkthrough on how to create the entire process:

In the "Attendee unregistration" workflow, open the workflow designer.

On the right-hand side, click "Add a workflow step" (rename to "Cache email variables").

Hover over the new step and choose "Move Step Up" from the dropdown to make it the first step.

Create two variables (click the "Variables" button at the bottom and click "Add" to create a new variable).

create variable "UnRegBody" - type string

create variable "UnRegSubject"- type string

click "Actions > More Actions > Build Dynamic String"

click on the blue "dynamic string" link to open the String-Builder window and enter in the following:

"This is a confrrmation that you have Un-Registered for "

Build the "[%Courses:Course Title%]" lookup variable by the following process:

click on the "Add Lookup" button in the lower left and choose:

Lookup:

Source = "Courses"

Field = "Course Title"

Find the List Item:

Field = "Courses:ID"

Value = "Registrations:Course ID

(Click the "fx" button to build the above value - choose Source = "Current Item", Field = "Course ID")

--I'm not going to detail building the rest of the message body itself, but if you want to add in additional info (course date, time, location, etc.), look at the first step of the "Attendee Registration" workflow (Cache all variables) and open the "This is a confirmation..." dynamic sting to see how that one was designed and duplicate the additional info as needed.--

Once you have the dynamic string built, click "OK" to exit the string builder window then click on the "in Variable:" link and choose "Variable: UnRegBody" from the dropdown.

click "Actions > More Actions > Build Dynamic String" once again, to build the email subject.

click on the blue "dynamic string" link to open the String-Builder window and enter in the following:

"RE: [%Courses:Course Title%]" (click the "Add Lookup" button to build the lookup in the same manner as before).

Click the "Variable..." link and choose "Variable: UnRegSubject" from the list to assign it.

To send the email itself, you can either create a new step and pattern it after the send email confirmation step in the registration workflow, or add it to the "Unregister from Course" step in the current ("Attendee Unregistration") workflow.

I wont detail both, but to do the latter, do the following:

Select the "Unregister from course" step and then Click "Actions > More Actions > Send an Email > Add".

Move this action to the top (hover over the action and choose "Move Action Up" 3 times so it appears above the "Delete item..." action).

Click on the blue "this message" link to begin defining the email message:

In the "To:" field, click the address book icon on the right and choose "User who created current item" from the list (this will display as "Registrations:Created By" in the "To:" field after you choose it) and "Add".

In the "Subject:" field, click the "fx" button and choose "Workflow Data" for the source, and "Variable: UnRegSubject" for the field, then click "OK" (will display as "Variable: UnRegSubject" in the "Subject: field after chosen).

Next, for the email body, click on the "Add Lookup to Body" and choose "Workflow Data" for the Source, and "Variable: UnRegBody" for the Field then click "OK".

Once completed, click "OK" to close the email message definition screen.

Now click "Finish" to build the workflow and you should be all done.

This should now send an email to the user if they unregister from a course.

- Dink

May 1, 2008 12:08 PM
 

Jimmy Adeyemi-Offor said:

I tried following the post above on the Cache email variable but I do not have assessment sessions  source. What could be responsible?

May 7, 2008 12:25 PM
 

Snehal H.Rana said:

Jimmy,

I think it is not Assessment sessions but instead it is Courses from the dropdown menu.

Dink,

Could you please confirm this.

Thanks for your help Dink,

Snehal H.Rana

May 27, 2008 1:54 PM
 

dink said:

Snehal,

You are correct (my bad)!!

Jimmy,

I've updated my previous comment to reflect the correct names.

When I originally posted the walkthrough in the comment, I was looking at a custom site I had where I had renamed the lists and consequently had to refer to them differently in the workflow.

It's now updated to be correct.

- Dink

May 27, 2008 2:20 PM
 

Snehal H.Rana said:

Dink,

I just got a confirmation from my client that this functionality works.  Great work!! I appreciate your help with this walkthrough.

Thanks

Snehal

May 27, 2008 3:56 PM
 

dink said:

Snehal,

Glad to hear it's working...and again, thanks for catching my error.  I think I may have just rushed through the walkthrough a little and didnt pay attention to the site I was working in...unfortunately, it happens.

- Dink

May 27, 2008 4:46 PM
 

Derek J. Punaro said:

Any idea why the workflows don't appear for me in SPD?  I have full control on the site.

May 30, 2008 3:35 PM
 

Jimmy said:

Thankst o Dink for the quick response and update. I figured it out after sending the comment and was able to use the tip successivefully to create the email fr unregistration.

Great job all around! The functionality definitely worked.

Thanks to Snehal as well for the tip.

I am appreciative!

June 3, 2008 2:50 PM
 

dink said:

Derek,

Is this a site based on the initial installation of the template? - as in, did you install the template and create a site from the "uncustomized" default, or did you create a site, customize it, save it as a template then create another site from it?

I ask, because from what I've seen in my testing, the workflows do not get saved (or at least they dont appear in SPD) for a customized template that you saved based on the original template.

One way to check to make sure that there are actually workflows attached to the template is to run through the registration process, then go into the settings for the "Registrations" list and look at the "Workflow Settings" page to see if any workflows are currently running (or look at the individual item on the list and look at the workflows running for the item).

Another test would be to create another site from the template and look at it through SPD to see if the workflows show up.

Let me know what you find.

- Dink

June 6, 2008 1:33 PM
 

Derek J. Punaro said:

This is an uncustomized template, straight out of the box.  The workflow is there and running.  Creating a different site from the template results the same thing.  It wouldn't be so frustrating if the workflow actually worked correctly in the first place!

June 6, 2008 2:54 PM
 

dink said:

Derek,

Have you looked at what the "Contributor Settings" are in SPD?

I've never experienced it myself, but from what I've read from others - the default properties after installation may need to be modified to give you permission to access the workflows.

In SPD, go to "Site > Contributor Settings".  Once there, click on each of the groups listed in the top window (Manage Contributoe Groups) and click the "Modify" button on the right.  On the properties page, look in the last screen (choose "SharePoint" on the left list) and see if the checkbox for workflows is checked or not.

I've seen mixed results doing the above to fix the issues, so the "Quick and dirty" way is to just choose "disable Contributor Settings" from the main window instead of going into each group and trying to modify them individually.

Hopefully this will help some.

Let me know if it still doesn't work for you.

- Dink

June 9, 2008 10:43 AM
 

Derek J. Punaro said:

Interesting option - I haven't ever seen this one before.  I tried both methods - the disable contributor settings and modifying the Content Authors group to "Allow creating, editing, and deleting workflows" and neither exposed the workflows in this site.  Could there be a required security setting in the site itself that's needed, even though I'm in the owners group w/Full Control?

June 9, 2008 1:47 PM
 

Derek J. Punaro said:

Ok, so there is some sort of server security issue.  If I run SPD as our system admin account, the workflows show up.  Apparently having full control just isn't enough these days!

Part 3 of this series should be fixing the typos in the emails!  That's how I started down this path initially.

June 12, 2008 11:31 AM
 

dink said:

Derek,

I think I have a fix for the issue you're having with not being able to view the workflows in SPD under the context of a non-system admin account.

Open the site in SPD as the system admin.  Once in, right-click the workflows folder and choose properties.  Go to the "Security" tab and choose "Manage permissions using the browser".  This will open the permissions area for the folder and allow you to add in the appropriate user (you) to be able to work with workflows for the site.  Once adding your account in, you should then be able to go back to SPD and connect in with your account and be able to now manage workflows.

I tested this with a test account that was displaying the same issue you were having (non-system admin account).  After following the above (I added the user with "Full Control" permissions), I was then able to manage workflows through SPD with that account.

I found this on the MS Office site under the troubleshooting section for SPD (office.microsoft.com/.../HA102379121033.aspx).

Hopefully this helps,

- Dink

June 13, 2008 1:54 PM
 

Derek J. Punaro said:

That does seem to have done the trick!  Thanks a million!

June 16, 2008 8:03 AM
 

Snehal H. Rana said:

Guys,

I get Failed to Start (Retrying) error message when I try to unregister for the course. Any idea why this could be happening?

Thanks

Snehal H.Rana

June 17, 2008 10:35 PM
 

Prashanth said:

Hello,

I want to develeop one Employee Activities Site which like sharing document, applying for leave and assigining task. In applying leave he should apply leave, then PM will have to approve with comments and then HR department lastly CEO (if necessary). than the person who applied for leave should get approve mail with comments.

Could you please help in this regards.

Thank you

Prashanth

June 26, 2008 6:38 AM
 

dink said:

Snehal,

(Sorry for the delay in responding)

Does the user that you're logged in as have permissions to "Delete Items" from the "Registrations" list?

Most of the workflow errors you'll see are because the users haven't been given the appropriate level of permissions to each of the lists that the workflows touch.

Verify what permissions are set and try running through the "unregistration" scenario again.

- Dink

June 26, 2008 9:53 AM
 

dink said:

Prashanth,

You may want to look into the "Absense and Vacation Schedule" template.  It has workflows tied to leave request submissions with approval/rejection.  

You should be able to add in the additional functionality you want by tying the process into a second workflow that (optionally) would route the request to the CEO.

Hope that helps,

- Dink

June 26, 2008 10:00 AM
 

Hilcheyman said:

The people responsible for our classes need the ability to approve class requests before the registrations are finalized.  I've tried opening the attendee registration workflow in SPD, but I'm at a loss as to what should be added at the top of the workflow.  And, yes, I am an SPD novice.  Any suggestions or resources you can point me to?

July 14, 2008 4:03 PM
 

Points-of-Sharing said:

Took me long enough to get this post up, but it's finally done (hopefully - please let me know if

July 24, 2008 6:11 PM
 

Sara said:

Hi, Thanks for this post. I am having a problem with security of the course list. I gave the user contribute permissions for the site. And I gave read only permission to the course list under manage permission for the course list. And while having read permission - if the user register/un register from the course - the Available seats do not change AT ALL. And I tried giving the contribute permission to the list to that user and available seats does work. How can I give user read permissions so that they cant edit/delete the item and available seat work? Please help

THanks

August 6, 2008 5:15 PM
 

dink said:

Hilcheyman,

The "MSDN" and "SharePointU" forums are probably your best bet on finding resources (walk-throughs, help, etc.) on workflows in SharePoint.

forums.msdn.microsoft.com/.../threads

www.sharepointu.com/forums

To give you and idea though, on how you might approach this (just brainstorming), you could create a custom list that would hold the users name (those that submit registration requests) and have approval turned on for this list.  

In the SPD worklflow for registration, have it add a new item to this list when someone registers (their name).  In this same workflow remove the part that add the user to the registration list (not our new custom list, but the existing registrations list).  Create a new workflow attached to our custom list set to initiate when an item is modified and its approval status set to "Approved", then add back in the section you removed from the other workflow (the part that actually registers them).

(the above may sound confusing, but read on...)

Essentially, what would now happen is that when a user registers for a course, their name would be added to a list of "Waiting to be approved" users.

Once approved, another workflow would fire off that will add the user to the registrations list.

One thing to consider though, is that workflows created in SPD will only run under the context of the user that initiated it, so you may need to look into a custom Visual Studio workflow (that can be designed to run under whomever you choose) to handle this type of workflow.

I'd still check on the other forums I mentioned though because someone else might be able to come up with a better solution.

Hopefully this will get you on the right track :)

- Dink

August 7, 2008 6:34 PM
 

Amanda said:

To get the registration workflow to work, I had to give the users edit ability.  But the client doesn't want the users to edit the classes, so I hid the toolbar.  They still want the Export Event feature.  Any ideas?

September 9, 2008 11:00 AM
 

dink said:

Amanda,

The toolbar is a compiled element, so I dont think there's a direct way to pull out pieces of it and only display them.

You may want to investigate a JavaScript option that could hide all the other parts and only show just the Export Event link.  Alternatively, you may also be able to look at an XSL route to dynamically build a custom "Export" link that feeds off the event Id of the course (the default link is built off this I think as well).

Sorry I couldn't help more,

- Dink

September 9, 2008 1:09 PM
 

Dilip said:

Should you check to see if the course has unlimited seating?

Great post. Thanks.

September 24, 2008 12:22 PM
 

Scott said:

I have the Training template installed and am having trouble with users being able to completely unregister from a course as well as the registration getting automatically deleted after the course is over.  I have checked and double-checked the workflows and permissions and don't see any problems.  I constantly get "Failed on Start (retrying)" and "Error deleting a list item" in every occasion.  I have even given users Full Control permissions to all content (registrations, past registrations, courses, etc) in the site and I STILL get these errors, so I don't really think it is a permissions issue.  The following stack trace and error message show up in the log files each time a workflow tries to delete a registration item.  I can't seem to come up with any information on this error.  Can someone please help?  Thanks in advance!

Error message from log file:

Microsoft.SharePoint.SPException: The request is not supported. (Exception from HRESULT: 0x80070032) ---> System.Runtime.InteropServices.COMException (0x80070032): The request is not supported. (Exception from HRESULT: 0x80070032)     at Microsoft.SharePoint.Library.SPRequestInternalClass.DeleteItem(String bstrUrl, String bstrListName, Int32 lID, UInt32 dwDeleteOp, Guid& pgDeleteTransactionId)     at Microsoft.SharePoint.Library.SPRequest.DeleteItem(String bstrUrl, String bstrListName, Int32 lID, UInt32 dwDeleteOp, Guid& pgDeleteTransactionId)     --- End of inner exception stack trace ---     at Microsoft.SharePoint.Library.SPRequest.DeleteItem(String bstrUrl, String bstrListName, Int32 lID, UInt32 dwDeleteOp, Guid& pgDeleteTransactionId)     at Microsoft.SharePoint.SPListItem.DeleteCore(...

October 8, 2008 1:16 PM
 

tatahere said:

Hi all,

     I have read through this post and used all mentioned over here to make my Training site functional. Many thanks to all of you. However, the only thing I am still struggling with is the date format. If you chose any other date format (based on locale on the server) e.g. English(UK), English(Canada), you are not able to edit some of the Courses in the "Courses" list.When you edit a course and edit the date also (even though not required) SharePoint allows you to save your changes but if you edit other fileds and not the dates  (Start Time/End Time) and try to save it, you get error "The data source control failed to execute the update command".

Any help on this is very much appreciated.

Thanks

tatahere

October 9, 2008 7:20 AM
 

Corey said:

I'm wondering if anyone else has seen an issue with the unregister where when a user registers they are given an access denied message. In the properties for the registration list, I set it up so that anyone can edit anyone's entries, to see if this would fix the problem. Now if a user hits unregister, it removes the first person on the list, which is obviously a huge problem. Any thoughts on where I need to add permissions so that people can unregister. Best I can tell is that the registration is done by the service account, and therefore allowing the user to only edit their own entries keeps them from editing anything. I would appreciate any help.

December 4, 2008 12:18 PM

Leave a Comment

(required )  
(optional )
(required )  
Add

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts