Tuesday, November 3, 2015

SharePoint 2013: adding a new content type to an existing list

Introduction

Notes and procedure on adding the ability to capture new meeting request information to an existing help desk ticketing service list.  Though the application is specific, the concepts that are presented here are general and apply to any situation in which you need to add a new content type to be used for capturing a new type of user information.  The help desk ticketing system has a number of different content types, each devoted to specific type of information to be captured from the user.  All of this information, no matter what type, is stored in a single list, the help desk ticketing system list.
   

Procedure

  1. Create new content type
    1. Navigate to the website hosting the list
    2. Go: Settings > Web Designer Galleries > Site content types
    3. Click the Create link.
    4. Complete the information for the new content type.  If you have already created other content types for your help desk ticketing list, be sure to select the appropriate Parent Content Type.  This should be the same parent content type used for the other help desk user request forms used in your list.
    5. Click OK. The Site Content Type Information page is displayed.  Look down in the Columns section.  If your new content type is based upon a general parent content type, you'll see an entry for the Item content type, the Title column (unless you have renamed this), and the other columns associated with your base help desk ticket list content type.
  2. Create new columns for this content type
    1. Navigate to the list.
    2. Go: Ribbon LIST tab > Settings Group > List Settings.
    3. Scroll down to the Columns section.
    4. Click Create column.  Completed as needed.  Main thing is, made sure that the Add to all content types and Add to default view options were unchecked.
    5. Repeat until all new columns have been created that you want to add to the new content type.
  3. Add new content type to list
    1. Navigate to the list.
    2. Go: Ribbon LIST tab > Settings Group > List Settings.
    3. Scroll down to the Content Types.
    4. Click Add from existing site content types.
    5. Select the appropriate content type, and then click the Add > button.
    6. Click OK.  The new content type now appears in the Content Types list.
  4. Add columns to the new content type
    1. Navigate to the list.
    2. Go: Ribbon LIST tab > Settings Group > List Settings.
    3. Scroll down to the Content Types.
    4. Click the link of the new content type.
    5. Add the columns that you created previously. Add them in the order that you want them to appear to the user in the form.
    6. Click OK.
  5. Add new content type form for adding items (Optional)
    1. Launch SharePoint Designer 2013
    2. Open the site containing the target list
    3. In the left Navigation panel, select Lists and Libraries.
    4. In the right Action panel, select the target list.
    5. In the Forms section, in the Action panel, click the New... button.
    6. Enter a name, select New item form, and then select the content type to use.
    7. Click OK.  The new form name will appear listed in the Forms section.  This form will include all list fields.
  6. Modify new item form (Optional)
    1. Launch SharePoint Designer 2013
    2. Open the site containing the target list
    3. In the left Navigation panel, select Lists and Libraries.
    4. In the right Action panel, select the target list.
    5. In the Forms section, click on the form you want to edit.  This opens the form in code view.
    6. Scroll down until you see a number of row elements featuring the names of the new columns you added.  To remove a column from this form, select the entire row, including the row markup, and then delete.  To move elements, cut and paste these rows where desired.
    7. Once you're done, click the Save button at top.  The edited form will be available immediately.

References

Notes

  • If you create a new form for this content type that adds items, this form may appear different from the new item form for this content type available from the New Item drop down on the ITEMS tab of the ribbon.  The form available from the New Item dropdown displays only those fields in the content type.  While the new item form you create via SharePoint Designer will have all fields.

No comments: