Create Custom view for SharePoint (2013) List | Manipulate Schema.xml

There may be many ways of creating views for SharePoint list, but following method would be most easiest and consistent way of achieving it as I found out.

Create a new list or in an existing list,  find the “view” tab. And create new view as your desired.

Go to schema.xml of the considered list on the solution.

Include your fields as below in the <ViewFields> XML parent.

<ViewFields>
<FieldRef Name="LinkTitle"></FieldRef>
<FieldRef Name="Date1" />
<FieldRef Name="Update" />
<FieldRef Name="Details" />
<FieldRef Name="Status" />
<FieldRef Name="Resolved1" />
<FieldRef Name="ResolutionDate" />
<FieldRef Name="ConfidenceLevel" />
<FieldRef Name="PHC" />
</ViewFields>

If there is any filtering in data; you can include those filtering there.

<Query>
<OrderBy>
<FieldRef Name="ID"></FieldRef>
</OrderBy>

<Where>
<Eq>
<FieldRef Name="Author"/>
<Value Type="Integer">
<UserID Type="Integer"/>
</Value>
</Eq>
</Where>

</Query>

If you further investigating on this following link would be useful. If you still finding difficulties, feel free to contact me.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s