Skip to main content

Cloud

Creating a Custom List Definition and Don’t Need the Title Column?

The Title column is a required column because a Custom List inherits from Item in SharePoint base content type hierarchy. The Item content type has one required column – Title. So what to do?

Ari Bakker has a great blog about creating a custom list, including xml structure for Site Columns, Content Type and Custom List. In my example I have created site columns, a content type and a custom list for Projects following Ari’s blog. Below are links to open my XML.

Site Columns

Content Type

Custom List

Let’s start by making a copy of the schema.xml file from the SharePoint Custom List. This will give us a basic schema that we can tweak.

Add your columns to the fields section, and here is the trick – Change the Name property of one of your text columns to LinkTitle. Internally the list uses LinkTitle for many controls, but your column in the UI will show DisplayName.

<Fields>

<Field ID="{82642ec8-ef9b-478f-acf9-31f7d45fbc31}"

Name="LinkTitle"

DisplayName="Project Name"

Sealed="TRUE"

SourceID="http://schemas.microsoft.com/sharepoint/v3"

StaticName="LinkTitle" />

<Field ID="{bc91a437-52e7-49e1-8c4e-4698904b2b6d}"

Name="LinkTitleNoMenu"

DisplayName="Project Name"

Sealed="TRUE"

SourceID="http://schemas.microsoft.com/sharepoint/v3"

StaticName="LinkTitleNoMenu" />

<Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}"

Name="Title"

DisplayName="Project Name"

Required="TRUE"

ShowInNewForm="TRUE"

ShowInEditForm="TRUE"/>

<Field ID="{b60d7dac-e8df-4e9f-9c7f-b744f7728cd3}"

Name="ProjectNumber"

Group="My Projects Site Columns"

Type="Text"

DisplayName="Project Number"

SourceID="http://schemas.microsoft.com/sharepoint/v3/fields"

StaticName="ProjectNumber"

Description="Enter project number (SAP #, IT PIE Project #)."

MaxLength="50"

DisplaySize="50"

Sortable="TRUE"

Required="TRUE"

AllowDeletion="FALSE">

<Default></Default>

</Field>

<Field ID="{4ca657a3-e843-444b-b7f1-56c47d540fc9}"

Name="ProjectDescripton"

Group="My Projects Site Columns"

Type="Note"

DisplayName="Project Descripton"

SourceID="http://schemas.microsoft.com/sharepoint/v3/fields"

StaticName="ProjectDescripton"

Description="Enter a brief description of the project."

RichText="TRUE"

RichTextMode ="FullHTML"

NumLines="6"

Sortable="FALSE"

Sealed="TRUE"

Required="TRUE"

AllowDeletion="FALSE">

<Default></Default>

</Field>

<Field ID="{fb04e565-49e9-4a54-b0d6-83bb2c0eafcb}"

Name="ProjectRole"

Group="My Projects Site Columns"

Type="Choice"

DisplayName="Project Role"

SourceID="http://schemas.microsoft.com/sharepoint/v3/fields"

StaticName="ProjectRole"

Description="Select your main role in the project."

Sortable="TRUE"

Sealed="TRUE"

Required="TRUE"

AllowDeletion="FALSE"

FillInChoice="FALSE">

<CHOICES>

<CHOICE>Sponsor</CHOICE>

<CHOICE>Owner</CHOICE>

<CHOICE>Project Manager</CHOICE>

<CHOICE>Team Member</CHOICE>

<CHOICE>Team Lead</CHOICE>

<CHOICE>Subject Matter Expert</CHOICE>

<CHOICE>IT Partner</CHOICE>

<CHOICE>Conultant</CHOICE>

</CHOICES>

<Default></Default>

</Field>

<Field ID="{84652802-5863-4d42-8018-5554f69a58fd}"

Name="ProjectStatus"

Group="My Projects Site Columns"

Type="Choice"

DisplayName="Project Status"

SourceID="http://schemas.microsoft.com/sharepoint/v3/fields"

StaticName="ProjectStatus"

Description="Select the project status."

Sortable="TRUE"

Sealed="TRUE"

Required="TRUE"

AllowDeletion="FALSE"

FillInChoice="FALSE">

<CHOICES>

<CHOICE>Pending</CHOICE>

<CHOICE>Active</CHOICE>

<CHOICE>Complete</CHOICE>

</CHOICES>

<Default></Default>

</Field>

<Field ID="{05084a28-be56-4ff6-9af6-d4601fa8f7e6}"

Name="ProjectComplete"

Group="My Projects Site Columns"

Type="DateTime"

DisplayName="Project Completion Date"

SourceID="http://schemas.microsoft.com/sharepoint/v3/fields"

StaticName="ProjectComplete"

Description=""

Sortable="TRUE"

Sealed="TRUE"

Required="FALSE"

StorageTZ="UTC"

AllowDeletion="FALSE"

FillInChoice="FALSE">

<Default></Default>

</Field>

<Field ID="{8da26d97-b873-4a8c-87fa-5cb093576b7f}"

Name="ProjectLink"

Group="My Projects Site Columns"

Type="URL"

DisplayName="Project Link"

SourceID="http://schemas.microsoft.com/sharepoint/v3/fields"

StaticName="ProjectLink"

Description="Enter the link to an existing SharePoint site or network file share."

Sealed="TRUE"

Required="TRUE"

AllowDeletion="FALSE">

<Default></Default>

</Field>

</Fields>

Once you have done that add your columns to all ViewFields sections. The trick here is to leave both the LinkTitle or LinkTitleNoMenu references and simply add your additional columns.

First ViewFields Section:

<ViewFields>

<FieldRef Name="LinkTitleNoMenu" />

<FieldRef Name="ProjectNumber" />

<FieldRef Name="ProjectDescription" />

<FieldRef Name="ProjectRole" />

<FieldRef Name="ProjectStatus" />

<FieldRef Name="ProjectComplete" />

<FieldRef Name="ProjectLink" />

</ViewFields>

Second ViewFields Section:

<ViewFields>

<FieldRef Name="LinkTitle" />

<FieldRef Name="ProjectNumber" />

<FieldRef Name="ProjectDescription" />

<FieldRef Name="ProjectRole" />

<FieldRef Name="ProjectStatus" />

<FieldRef Name="ProjectComplete" />

<FieldRef Name="ProjectLink" />

</ViewFields>

So what does it all look like you ask?

Voila! Custom List with no apparent Title column and all the control left. Here is the updated schema.xml if you are interested.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

PointBridge Blogs

More from this Author

Follow Us