Your privacy matters: This site uses cookies to analyze site usage and provide social media features. Learn More.

Creating a Content Type for the Timesheet InfoPath Form

In previous tutorials I showed you how to create a Departments list and custom lookup column that uses the Departments list as its data source for the dropdown values. In the first article, I mentioned I was going to show you how to create an InfoPath form to allow users to submit their time and then use a workflow to validate and approve the time submission. In this tutorial, I will illustrate how to create a content type that will be used to store data for the Timesheet InfoPath form.

A Content Type is a SharePoint object that contains columns that are used to describe a specific piece of content, such as a Timesheet entry. Out of the box content types include Document, Item, Event and Contact, for example. Content types can be created at various levels within a SharePoint site hierarchy including the Site Collection and Site level. The higher up the hierarchy the content type resides, the broader the scope in which it can be used. Since content types are objects, workflows can check for specific content types or create a workflow for a specific content type.

Our Timesheet content type is going to have the following columns:

  • Employee Name (people lookup type)
  • Weekending Date (Date/time type for Date only)
  • Department (this will be our Department lookup column we created in a previous tutorial)
  • Hours worked (number field with two decimal places type)
  • Notes (multiple lines of plain-text type)

I will show you how to create the Notes column. After that, to avoid repetitive steps, I will give you a table of values for the remaining columns and let you create them using the steps for the Notes field.

You will need to navigate to the same location where the departments column was created, which should be the root of your site collection. My departments list and custom column are at the root of my training site.

Creating Timesheet Content Type

Here are the steps to create the Timesheet content type and the Notes column:

  1. Click the Settings gear Settings Gear Iconin the upper right corner and choose Site Settings from the dropdown.

    Site Setting menu


  2. On the Site Settings page, select Site Content Types under the Web Designer Galleries heading.
    Site Content Type menu

  3. On the Site Content Types page, click the Create button to open the New Content Type page.
    Create Site Content Types


  4. Complete the New Site Content Type page using the values in the screen below and click OK when you are done.
    New Site Content Type Properties
  5. The TimeSheet Site Content Type page is where you will add the columns needed for this content type. To add a new Column, click the Add from new site column link.
    Add from new site column
  6. On the Create Column page, type Timesheet Notes for the column name and choose Multiple Lines of Text asthe column type.
    Create Site Column

  7. Accept the rest of the settings for this column and click OK at the bottom of the page. You will see the new column in the columns list as shown below.
    List of Columns

  8. Below is a list of columns that need to be created and the settings for each one. Create the remaining columns using the previous three steps. I will include screen shots for each column's settings at the end of the article for your reference.

    Column Name Weekending Date
    Type of Column Date and Time
    Date and Time Format Date Only
    Date Format Standard
    Default Value Today's Date


    Column Name Employee Name
    Type of Column Person or Group
    Enforce Unique Values No
    Allow Multiple Selections No
    Allow Selection Of People Only
    Choose From All Users
    Show Field Name (with Presence)
    Column Name Hours Worked
    Type of Column Number
    Number of Decimal Places 2
    Default Value Number


  9. Here are the list of columns that you should have after you complete this step.

    Complete List of Columns (click for larger image)

  10. Now that you completed creating the Weekending Date, Employee Name and Hours Worked columns, it's time to add the Departments column that we created a previous article. Instead of creating this column, we are going to add it to our content type.

  11. Click the Add from existing site columns link on the Content Type page.
    Add from existing site columns
  12. On the Add Columns page, choose Custom Columns from the Select columns from: dropdown. Click Departments in the Available columns box and click the Add> button. Click OK to add the column.

    Select Columns to Add
  13. Here is the complete list of columns in our Timesheet content type
    Complete List of Columns

Organizing Fields

Let's organize the fields in the order that they will appear in our timesheet. Below is a sneak peek at the form we will build in future articles. As you can see, the columns are not in the correct order.

Final Timesheet Form

  1. Click the Column order link right under the Add from new site column link.
    Column Order
  2. Order the columns like the screen below by changing the values in the dropdowns next to each column. Click OK when done.

    Use Dropdown Values to Order (click for larger image)

  3. The last change we need to make is to the Title field. In the InfoPath form, we will dynamically build the title with information from the form, but we need to change it from being REQUIRED to being HIDDEN so that it will not appear in the forms. Click on the Title caption.
    Change Title Field

  4. In the Column Settings section, select Hidden (will not appear in forms) and click OK.

    Change Content Type

That it! You've created the Timesheet content type.

Timesheet Content Type Complete

Here are the screenshots of the columns you created in this article for your reference:

Edit Column Screenshot 1

Edit Column Screenshot 2

Edit Column Screenshot 3
Edit Column Screenshot 4

Happy SharePoint-ing!


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

Previous: Projecting Additional Columns from the Department List
Next: Creating a Content Type for the Timesheet InfoPath Form



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.

 

Contact Us:

Accelebrate’s training classes are available for private groups of 3 or more people at your site or online anywhere worldwide.

Don't settle for a "one size fits all" public class! Have Accelebrate deliver exactly the training you want, privately at your site or online, for less than the cost of a public class.

For pricing and to learn more, please contact us.

Contact Us Train For Us

Toll-free in US/Canada:
877 849 1850
International:
+1 678 648 3113

Toll-free in US/Canada:
866 566 1228
International:
+1 404 420 2491

925B Peachtree Street, NE
PMB 378
Atlanta, GA 30309-3918
USA

Subscribe to our Newsletter:

Never miss the latest news and information from Accelebrate:

Microsoft Gold Partner

Please see our complete list of
Microsoft Official Courses

Recent Training Locations

Alabama

Huntsville

Montgomery

Birmingham

Alaska

Anchorage

Arizona

Phoenix

Tucson

Arkansas

Fayetteville

Little Rock

California

San Francisco

Oakland

San Jose

Orange County

Los Angeles

Sacramento

San Diego

Colorado

Denver

Boulder

Colorado Springs

Connecticut

Hartford

DC

Washington

Florida

Fort Lauderdale

Miami

Jacksonville

Orlando

Saint Petersburg

Tampa

Georgia

Atlanta

Augusta

Savannah

Idaho

Boise

Illinois

Chicago

Indiana

Indianapolis

Iowa

Ceder Rapids

Des Moines

Kansas

Wichita

Kentucky

Lexington

Louisville

Louisiana

Banton Rouge

New Orleans

Maine

Portland

Maryland

Annapolis

Baltimore

Hagerstown

Frederick

Massachusetts

Springfield

Boston

Cambridge

Michigan

Ann Arbor

Detroit

Grand Rapids

Minnesota

Saint Paul

Minneapolis

Mississippi

Jackson

Missouri

Kansas City

St. Louis

Nebraska

Lincoln

Omaha

Nevada

Reno

Las Vegas

New Jersey

Princeton

New Mexico

Albuquerque

New York

Buffalo

Albany

White Plains

New York City

North Carolina

Charlotte

Durham

Raleigh

Ohio

Canton

Akron

Cincinnati

Cleveland

Columbus

Dayton

Oklahoma

Tulsa

Oklahoma City

Oregon

Portland

Pennsylvania

Pittsburgh

Philadelphia

Rhode Island

Providence

South Carolina

Columbia

Charleston

Spartanburg

Greenville

Tennessee

Memphis

Nashville

Knoxville

Texas

Dallas

El Paso

Houston

San Antonio

Austin

Utah

Salt Lake City

Virginia

Richmond

Alexandria

Arlington

Washington

Tacoma

Seattle

West Virginia

Charleston

Wisconsin

Madison

Milwaukee

Alberta

Edmonton

Calgary

British Columbia

Vancouver

Nova Scotia

Halifax

Ontario

Ottawa

Toronto

Quebec

Montreal

Puerto Rico

San Juan

© 2013-2019 Accelebrate, Inc. All Rights Reserved. All trademarks are owned by their respective owners.