Monday, August 19, 2013

Stages for Workflows in SharePoint Designer 2013

This blog post will show how we can use stage in workflow in sharepoint designer 2013. Stage is a group of  action/activities, it is new feature of sharepoint designer 2013. There is at least 1 stage in workflow and there is only one way in and one way out of the stage.

Here for demonstration, I have 3 lists, made from Announcement List Template. 

1. Announcement
2. CustomerAnnouncement
3. EmployeeAnnouncement

Announcement list will have 1 additional column :

Name : "PostTo"
Type : Choice
Values : Employee and Customer.

Step 1: Go to sharepoint Designer 2013, select list workflow from ribbon and select Announcement list.

Step 2:  Add 2 new Stages to the workflow and name it as CustomerAnnouncement and EmployeeAnnouncement

Step 3 : Rename Stage 1 to MoveToTargetAnnouncementList

Raw structure should look like this.

Step 4: Add Condition If any values equals to value to Transition to stage section inside MoveToTargetAnnouncementList Stage.

 Compare value of PostTo field to customer for moving control to CustomerAnnouncement and employee for moving to EmployeeAnnouncement Stage

Step 5: In EmployeeAnnouncement Stage,Add Create a new list item action. Select List to EmployeeAnnouncent with 2 properties such as  1. Title : current item title 2. Body: current item body

End the workflow in transition.

Step 6: Do same steps for Customer Announcement

Step 7: Save and publish workflow

Step 8 : To test, Go to announcement list, add title, body and posto:Employee. Start workflow and you can see an item is created in employeeAnnouncement list. Similarly an item will be added to customerAnnouncment list  if postTo value is Customer.

Enjoy !


Staygreen Academy said...

I absolutely love your blog and find nearly all of your post’s to be precisely what I’m looking for.
SharePoint Online Training

Manideep Agarwal said...

Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
SharePoint Consulting