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.
[code language="xml"]
<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>
[/code]
If there is any filtering in data; you can include those filtering there.
[code language="xml"]
<Query>
<OrderBy>
<FieldRef Name="ID"></FieldRef>
</OrderBy>
<Where>
<Eq>
<FieldRef Name="Author"/>
<Value Type="Integer">
<UserID Type="Integer"/>
</Value>
</Eq>
</Where>
</Query>
[/code]
If you further investigating on this following link would be useful. If you still finding difficulties, feel free to contact me.
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.
[code language="xml"]
<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>
[/code]
If there is any filtering in data; you can include those filtering there.
[code language="xml"]
<Query>
<OrderBy>
<FieldRef Name="ID"></FieldRef>
</OrderBy>
<Where>
<Eq>
<FieldRef Name="Author"/>
<Value Type="Integer">
<UserID Type="Integer"/>
</Value>
</Eq>
</Where>
</Query>
[/code]
If you further investigating on this following link would be useful. If you still finding difficulties, feel free to contact me.
Comments
Post a Comment