SharePoint Events

  9/03 - Webcast: SharePoint 2013 vs. SharePoint Online: Workflow
  9/04 - Webcast: Power Business Intelligence for SharePoint Online and Office 365
  9/05 - Webcast: SharePoint 2013 vs. SharePoint Online: Search
  9/30 - Webcast: Project Management Workflow in SharePoint
  10/01 - Webcast: SharePoint 2013 vs. SharePoint Online: Enterprise Content Management
  10/02 - Webcast: SharePoint 2013 vs. SharePoint Online: Business Intelligence

 SharePoint Videos

  Why SharePoint 2013
  Keys to Successful SharePoint Initiatives and User Adoption
  Out of the Box Business Intelligence and Reporting in SharePoint 2013
  Driving the Business Case and User Adoption for SharePoint
  Automate Business Processes with SharePoint 2013 and Business Connectivity Services
  SharePoint and Office 365 Migration Made Easy
  Full Lifecycle Content Management with SharePoint 2013
  Compliant Document Generation and Assembly in SharePoint
  Application of Content Security and Corporate Risk Protection in SharePoint
  How to Redline, Markup, Collaborate and Review Content in SharePoint
  Advanced Content Lifecycle and Records Management in SharePoint
  Advanced Workflow Made Easy with SharePoint 2013 and Nintex
  Full Lifecycle Content Management with SharePoint 2013
  SharePoint 2013 Solutions for the Financial Services Industry
  ProjectReady 2013: SharePoint Solutions built for the AEC
  SharePoint 2013 Solutions for the Legal Industry
  Driving the Business Case and User Adoption for SharePoint
  Investment Considerations for SharePoint 2010 and SharePoint 2013
  SharePoint 2013 and Enterprise Content Management
  SharePoint 2013 Launch
(More Links...)

 Archives

Opening SharePoint Links in a new windowUse SHIFT+ENTER to open the menu (new window).
Mail Enabled Lists vs. The Missing Windows 2008 POP3/IMAP Server Use SHIFT+ENTER to open the menu (new window).
7 Tools for SharePoint DevelopersUse SHIFT+ENTER to open the menu (new window).
Public Facing Masterpage TechniquesUse SHIFT+ENTER to open the menu (new window).
How to Quickly Deploy and Activate a Timer Service to Your Site CollectionUse SHIFT+ENTER to open the menu (new window).
Custom SharePoint Master Page Feature with WSP BuilderUse SHIFT+ENTER to open the menu (new window).
Date Math with InfoPathUse SHIFT+ENTER to open the menu (new window).
Enterprise Search Tricks and Tips Part 1Use SHIFT+ENTER to open the menu (new window).
Populating Word Documents With SharePoint Data. Try The DIP!Use SHIFT+ENTER to open the menu (new window).
Programmatic Deep Dive into Blank SharePoint Lookup ColumnsUse SHIFT+ENTER to open the menu (new window).
1 - 10 Next
Custom Views for Multiple Content Types within a Single List

By: Kathryn Bartlett

In this example, we have two custom content types based off the Event list content type: (1) “Event Type 1”, with single line text fields “Column A” and “Column B”, and (2) “Event Type 2”, with single line text fields “Column Y” and “Column Z”.  Create a Calendar, “Sample Calendar”, and add these two content types to the list.  After creating an event of both content types, we see that the add, edit, and display forms all act as we would hope – only columns in that content type appear.

Custom_Views_for_Multiple_Content_Types_within_a_Single_List

Figure 1 - Add/Edit Event Type 1

Custom_Views_for_Multiple_Content_Types_within_a_Single_List

Figure 2 - Add/Edit Event Type 2

Custom_Views_for_Multiple_Content_Types_within_a_Single_List

Figure 3 - View Event Type 1

Custom_Views_for_Multiple_Content_Types_within_a_Single_List

Figure 4 - View Event Type 2

However, we may not need the Category, All Day Event, Recurrence, or Workspace columns.  In this example, we want to remove them from the views.  Open SharePoint Designer 2010, open your site, and click on the list.  On the right, there is a section for Forms.

Custom_Views_for_Multiple_Content_Types_within_a_Single_List

Click New… and create a new item form that is and use the content type Event Type 1.

Custom_Views_for_Multiple_Content_Types_within_a_Single_List 

Now this form will appear in the Forms panel.

Custom_Views_for_Multiple_Content_Types_within_a_Single_List

Click nf1.aspx to edit the form.  From the split view, find the table row tags containing the columns you want to delete and remove these lines from the page.  Set this as the default New Form page, and create a new Event Type 1 event.  Creating an event of Event Type 1, it seems all is set. 

Custom_Views_for_Multiple_Content_Types_within_a_Single_List

However, now when we go to create an event of Event Type 2, we get the same new form as in Event Type 2.  We need to create a new form for Event Type 2 in the same way we did for Event Type 1 above. 

If we set this new form to be the default, we run into the same issue when we try to create an event of Event Type 1.  To resolve this, we need to associate the form with the content type itself, not with the list. Click on the sample calendar in SharePoint Designer.  At the bottom left, there is a panel for Content Types.

Custom_Views_for_Multiple_Content_Types_within_a_Single_List

Click on our content type Event Type 1.  On the top right, there is a panel for Forms.

Custom_Views_for_Multiple_Content_Types_within_a_Single_List

Click the section for New Form to enter the URL of our custom new form, enter the URL, hit Enter, and save your changes. 

Custom_Views_for_Multiple_Content_Types_within_a_Single_List

Do the same for Event Type 2. Now when we try to add an event of each content type, we get the appropriate new forms.

Custom_Views_for_Multiple_Content_Types_within_a_Single_List

Figure 5 - Custom New Form for Event Type 1

Custom_Views_for_Multiple_Content_Types_within_a_Single_List

Figure 6 - Custom New form for Event Type 2

Repeat the same steps for the Edit and Display forms to complete the custom views.

By: Kathryn Bartlett

        

Comments

There are no comments yet for this post.
Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Your Name *


e-mail address *


Website (optional)


Comment *


Attachments

 Subscribe

  GigWerks RSS  Gig Werks Mailing List 

 Contact Us

 Connect

 Resources

  On Demand SharePoint Webcast Recordings
  Upcoming Webinars
  SharePoint Resources
  Business Intelligence Resources
  Gig Werks Website



©2009 Gig Werks. All rights reserved. Privacy Policy