License Public Domain
Lines 31
Average
n/a
Rated
0
Times
5
4
3
2
1
0
Keywords
data zoom (17) nvelocity (17) sharepoint (20) velocity (16)
Permissions
Owner: tonybierman
Viewable by Everyone
Editable by tonybierman's Friends and "SharePoint Data Zoom Web Part Community" Group Members
Hide
Free your code from a slow death on your hard drive Join Siafoo Now or Learn More

Active Tasks (Get Items By View) using SharePoint Data Zoom Web Part Atom Feed

In Brief Get the tasks using the "Active Tasks" view.
# 's
 1## Get the tasks list
2#set( $tasksList = $web.lists.get_item("Tasks") )
3
4## Get edit url information
5#set( $sourceUrlEncoded = $HttpUtility.UrlEncode($request.RawUrl) )
6#set( $editForm = $tasksList.Forms.get_item($PAGETYPE_PAGE_EDITFORM) )
7
8## Get the items in the 'Active Tasks' view
9#set( $activeTasksView = $tasksList.Views.get_item("Active Tasks") )
10#set( $activeTasksItems = $tasksList.GetItems($activeTasksView) )
11
12#foreach($item in $activeTasksItems)
13 #beforeall
14 <table class="ms-listviewtable" cellpadding="3" cellspacing="0" border="0" width="100%">
15 <tr class="ms-viewheadertr">
16 <th class="ms-vh2-nofilter">Title</th>
17 <th class="ms-vh2-nofilter">Status</th>
18 <th class="ms-vh2-nofilter">Priority</th>
19 </tr>
20 #odd
21 <tr class="">
22 #even
23 <tr class="ms-alternating">
24 #each
25 <td class="ms-vb2"><a href="$web.Url/$editForm.Url?ID=$item.ID&Source=$sourceUrlEncoded">$item.get_item("LinkTitle")</a></td>
26 <td class="ms-vb2">$item.get_item("Status")</td>
27 <td class="ms-vb2">$item.get_item("Priority")</td>
28 #after
29 </tr>
30 #afterall
31 </table>
32 #nodata
33 No tasks found
34
35#end

Get the tasks using the "Active Tasks" view.