SharePoint Tutorial: How to Create a SharePoint Employee In & Out Board, Part 2

We offer private, customized training for 3 or more people at your site or online.

In the previous SharePoint tutorial (Part I), you created the In & Out Board and Employee Status lists. In Part II, we will build the custom workflow that will be used to update the Employee Status list. To perform these steps, you will need to know the location of the two lists created in the previous tutorial, and you will need SharePoint Designer 2013 to create the workflow.

Create the Update Employee Status Workflow

  1. To begin, open SharePoint Designer 2013 and then open the site that contains the In & Out Board and Employee Status lists.
  2. In SharePoint Designer 2013, in the Navigation pane (left side), click the Workflows node.
  3. In the Workflows tab in the ribbon, click the List Workflow button and select the IOBoard list from the dropdown.
  4. On the Create List Workflow – IOBoard dialog, provide these responses:
    1. Name: Update Employee Status Workflow
    2. Platform Type: SharePoint 2013 Workflow
  5. Click OK.
  6. The Text-based Designer should open, as shown below:
    Text-based Designer

Create the Update or Insert, Create, and Update Stages

  1. Click the Stage 1 title and rename the stage to Update or Insert Status, then press ENTER.
  2. Click below the Update or Insert Status stage and click the Stage button in the ribbon. Click the below the Stage 2 you just added and click the Stage button again. You should have three stages, as shown below:
    Stages
  3. Click the Stage 2 title and rename the stage to Create, then press ENTER.
  4. Click the Stage 3 title and rename the stage to Update, then press ENTER.

Build out the Update or Status Stage

  1. Within the Update or Insert Status stage, in the Transition to Stage section of the stage, click under the “Insert go-to actions with conditions for transition to the stage” caption.
    Status Stage
  2. In the Ribbon, click the Condition button and select the If Any Value Equals Value condition.
  3. Click the value link just to the right of the If and click the Fx button (workflow lookup).
  4. On the Define Workflow Lookup dialog:
    1. Select Employee Status for the Data Source.
    2. Select Employee Name for Field from Source.
    3. Down in the Find the List Item section:
      1. Select Employee Name for the Field.
      2. Click the Fx button to the right of the Value text box.
      3. On The Lookup for Person or Group dialog:
        1. Select Current Item for Data Source
        2. Select Employee Name for Field from Source
        3. Select Display Name for Return Field As.
        4. Click OK on the Lookup for Person or Group dialog
    4. Click OK on the Define Workflow Lookup dialog.
  5. Click Yes to the “The lookup that you defined…” dialog.
  6. Click the second Value link to the right of the equals text.
  7. In the Select User dialog, click Workflow Lookup for a User… option from Or select from existing Users and Groups: and click the Add>> button.
  8. On the Lookup for Person or Group dialog, make the following selections, then click OK:
    1. Current Item for Data Source
    2. Employee Name for Field from Source
    3. Display Name for Return Field As
  9. Click under the “Insert go-to actions with conditions for transitioning to the stage” caption between the If and the Else lines. Click the Action button in the ribbon and click Go to a stage.
  10. Click the a Stage link in the Go to a Stage action you inserted in the previous step. Select Update from the dropdown.
  11. Click under the “Insert go-to actions with conditions for transition to the stage” caption under the Else line. Click the Action button in the ribbon and click Go to a stage.
  12. Click the a Stage link in the Go to a Stage action you inserted in the previous step. Select Create from the dropdown.

Build out the CREATE stage

  1. In the Create stage, click under the (Start typing or user the Insert group on the Ribbon) caption. Click the Action button and select Create List Item (in the List Actions group).
  2. In the Create Item action, click this list link.
  3. On the Create a New List Item dialog:
    1. Select Employee Status from the List: dropdown.
    2. Click the Employee Name (*) field and click the Modify… button
    3. On the Value Assignment dialog, click the Fx button for the To this value: box.
    4. On the Lookup for Person or Group dialog:
      1. Current Item for Data Source
      2. Employee Name for Field from Source
      3. Display Name for Return Field As
      4. Click OK
    5. Click OK on the Value Assignment dialog.
    6. Select Entry Date and Time (*) and click the Modify… button
    7. On the Value Assignment dialog, click the Fx button for the To this value: box.
    8. On the Lookup for Date and Time dialog:
      1. Current Item for Data Source
      2. Entry Date and Time for Field from Source
      3. Click OK
    9. Click OK on the Value Assignment dialog.
    10. Select Comment and click the Modify… button.
    11. Click the Fx button for the To this value: box.
    12. On the Lookup for Single Line of Text dialog:
      1. Current Item for Data Source
      2. Comment for Field from Source
      3. Click OK
    13. Click OK on the Value Assignment dialog.
    14. Select In or Out (*) and click the Modify… button
    15. Click the Fx button for the To this value: box.
    16. On the Lookup for Choice dialog:
      1. Current Item for Data Source
      2. In or Out for Field from Source
      3. Click OK
    17. Click OK on the Value Assignment dialog.
  4. The Create Item dialog should appear similar to the screen below:
    Create Item Dialog
  5. Click OK on the Create a New List Item dialog.
  6. In the Create stage, click in the Transition to Stage section.
  7. Click under the “Insert go-to actions with conditions for transition to the stage” caption, click the Action button in the ribbon and click Go to a stage.
  8. Click the a Stage link in the Go to a Stage action you inserted in the previous step. Select End Of Workflow from the dropdown.

Build out the Update stage

  1. In the Update stage, click under the (Start typing or use the Insert group on the Ribbon) caption. Click the Action button and select Update List Item (in the List Actions group).
  2. In the Update Item action, click the this list link.
  3. On the Update New List Item dialog,
    1. Select Employee Status from the List: dropdown.
    2. Click the Add… button.
    3. Select the Entry Date and Time (*) from the Set this field: dropdown
    4. On the Value Assignment dialog, click the Fx button for the To this value: box.
    5. On the Lookup for Date and Time dialog:
      1. Current Item for Data Source
      2. Entry Date and Time for Field from Source
      3. Click OK
    6. Click OK on the Value Assignment dialog.
    7. On the Create New List Item dialog, click the Add… button.
    8. On the Value Assignment dialog, choose Comment from the Set this field dropdown.
    9. Click the Fx button for the To this value: box.
    10. On the Single line of Text dialog:
      1. Current Item for Data Source
      2. Comment for Field from Source
      3. Click OK
    11. Click OK on the Value Assignment dialog.
    12. On the Update List Item dialog, click the Add… button.
    13. On the Value Assignment dialog, choose In or Out from the Set this field dropdown.
    14. Click the Fx button for the To this value: box.
    15. On the Lookup for choice dialog,
      1. Current Item for Data Source
      2. In or Out for Field from Source
      3. Click OK
    16. Click OK on the Value Assignment dialog.
    17. Down in the Find the List Item section of the dialog, select Employee Name from the Field: dropdown.
    18. Click the Fx button next to the Value: box.
    19. On the Lookup for Person or Group dialog,
      1. Current Item for Data Source
      2. Employee Name for Field from Source
      3. Display Name for Return Field As
      4. Click OK
    20. Click Yes to the “The lookup that you defined…” dialog.
  4. The Update Item dialog should appear similar to the screen below:
    Update Item Dialog
  5. Click OK on the Create a New List Item dialog.
  6. In the Update stage, click in the Transition to Stage section.
  7. Click under the “Insert go-to actions with conditions for transition to the stage” caption, click the Action button in the ribbon and click Go to a stage.
  8. Click the a Stage link in the Go to a Stage action you inserted in the previous step. Select End Of Workflow from the dropdown.

Finish Configuring the Workflow

  1. Click the Save button in the ribbon to save the workflow.
  2. Click the Publish button in the ribbon to subscribe the workflow to the Employee Status list.
  3. After you publish the workflow, click the Update Employee Status Workflow link in the bread crumb above the Text-based designer, as shown below:
    Breadcrumb Link
  4. On the Update Employee Status Workflow page, under the Start Options section, click Start workflow automatically when an item is created.
  5. Click the Publish button in the ribbon again to update the changes to the workflow.

Testing the Workflow

In this section, you will test the workflow. You will create two entries in the IOBoard list. The first entry should trigger the CREATE stage in the workflow and create a list item in the Employee Status list. The second entry should trigger the UPDATE stage in the workflow and update the previously created item in the Employee Status List.

  1. Open Internet Explorer (or “supported” browser or your choice) and navigate to the site where you created the IOBoard and Employee Status lists in the previous article.
  2. Open the IOBoard site, which should be in the Recent section of the left navigation. If not, click the Gear and select Site Contents. Click the IOBoard list on this page.
  3. Click New Item Button button. The Title field is optional and can be left blank. This will be removed when the InfoPath form is created for this list (next article).
  4. Type your name in the Employee Name box.
  5. Choose an Entry Date and Time. I left the date to the current date, but changed the time portion to 6 AM; the time I came into the office (I’m a morning person…).
  6. Leave In or Out to In.
  7. Type In the Office for the Comment.
  8. Data Entry

  9. Click the Save button.
  10. The workflow was configured to run when a new item is created. The item for the above entry should show Create in the Update Employee Status Workflow column, which is added to the default view automatically when a workflow is kicked off.

    IOBoard
  11. In a new IE tab, navigate to the Employee Status list. You should see one entry for your name in the list. My entry is shown below. This was created by the workflow.

    Employee Status
  12. Let’s test the Update function of the workflow. Switch back to the IOBoard list and let’s create an Out item for Lunch.
  13. Click New Item Button button. Remember, the Title field is optional and can be left blank.
  14. Type your name in the Employee Name box.
  15. Choose an Entry Date and Time. I left the date to the current date, but changed the time portion to 12 PM.
  16. Set In or Out to Out.
  17. Type Out to Lunch with Co-Workers for the Comment.
  18. Data Entry

  19. Click the Save button.
  20. After a few seconds, you should get Update in the Update Employee Status Workflow column for the new Out entry.
    IOBoard
  21. Switch over to the tab you opened for the Employee Status list. The information for your name should be updated to reflect the Out entry created in the above steps.
    Employee Status

The Employee Status list should only have one (1) entry per unique person. If the workflow does not find a corresponding entry in the Employee Status list for the person’s name, the workflow will create an entry. If the workflow finds an existing Employee Status entry for the person, the workflow will update the existing entry with the information submitted in the IOBoard list.

Having the ability to lookup information in other lists is an advanced function of SharePoint 2013 workflows, and something I use on a daily basis.
In the next and final article in the series, I will show you how to create an InfoPath form for the IOBoard list and add it to a SharePoint page.

Until next time, Happy SharePoint’ing.

Proceed to Part III.

Or go back and check out Part I.


Author: Eric Stepek, one of Accelebrate’s SharePoint instructors



In-Depth SharePoint Training

For in-depth SharePoint training, click here to view all of Accelebrate's SharePoint training courses for you and your staff.

Request Pricing 

 

Learn faster

Our live, instructor-led lectures are far more effective than pre-recorded classes

Satisfaction guarantee

If your team is not 100% satisfied with your training, we do what's necessary to make it right

Learn online from anywhere

Whether you are at home or in the office, we make learning interactive and engaging

Multiple Payment Options

We accept check, ACH/EFT, major credit cards, and most purchase orders



Recent Training Locations

Alabama

Birmingham

Huntsville

Montgomery

Alaska

Anchorage

Arizona

Phoenix

Tucson

Arkansas

Fayetteville

Little Rock

California

Los Angeles

Oakland

Orange County

Sacramento

San Diego

San Francisco

San Jose

Colorado

Boulder

Colorado Springs

Denver

Connecticut

Hartford

DC

Washington

Florida

Fort Lauderdale

Jacksonville

Miami

Orlando

Tampa

Georgia

Atlanta

Augusta

Savannah

Hawaii

Honolulu

Idaho

Boise

Illinois

Chicago

Indiana

Indianapolis

Iowa

Cedar Rapids

Des Moines

Kansas

Wichita

Kentucky

Lexington

Louisville

Louisiana

New Orleans

Maine

Portland

Maryland

Annapolis

Baltimore

Frederick

Hagerstown

Massachusetts

Boston

Cambridge

Springfield

Michigan

Ann Arbor

Detroit

Grand Rapids

Minnesota

Minneapolis

Saint Paul

Mississippi

Jackson

Missouri

Kansas City

St. Louis

Nebraska

Lincoln

Omaha

Nevada

Las Vegas

Reno

New Jersey

Princeton

New Mexico

Albuquerque

New York

Albany

Buffalo

New York City

White Plains

North Carolina

Charlotte

Durham

Raleigh

Ohio

Akron

Canton

Cincinnati

Cleveland

Columbus

Dayton

Oklahoma

Oklahoma City

Tulsa

Oregon

Portland

Pennsylvania

Philadelphia

Pittsburgh

Rhode Island

Providence

South Carolina

Charleston

Columbia

Greenville

Tennessee

Knoxville

Memphis

Nashville

Texas

Austin

Dallas

El Paso

Houston

San Antonio

Utah

Salt Lake City

Virginia

Alexandria

Arlington

Norfolk

Richmond

Washington

Seattle

Tacoma

West Virginia

Charleston

Wisconsin

Madison

Milwaukee

Alberta

Calgary

Edmonton

British Columbia

Vancouver

Manitoba

Winnipeg

Nova Scotia

Halifax

Ontario

Ottawa

Toronto

Quebec

Montreal

Puerto Rico

San Juan