Question

I have meeting workspace with several meetings. I add a meeting that was in past and its date is before all other meetings. But on default.aspx page, in the left menu, meetings are sorted by IDs, not by date.

Is there any way how to change this?

Was it helpful?

Solution

This is possible using SharePoint Designer 2010 (I have not tried this using Designer 2007, or on a 2007 SharePoint site).

  • Open the meeting workspace in SharePoint Designer
  • Click 'Edit site home page'
  • Click within the left hand navigation (where the dates are that you want to sort)
  • Click on 'List view options' (a little hover button that will appear when you click the area)
  • Click 'Sort and Group'
  • Add 'EventDate' to the sorting

Done.

Hope this helps!

OTHER TIPS

I found a way how to do this in powershell. You can run this code on the machine where the sharepoint is installed:

$w = get-spweb http://localhost/meetingsWeb
$l = $w.Lists["Meeting Series"]
$v = $l.Views[2] # view for the 'MeetingNavgator' should be third
$q = $v.Query
$v.Query = $q + '<OrderBy><FieldRef Name="EventDate" Ascending="TRUE" /></OrderBy>'
$v.Update()

Note, that the code is prone to error. For example, you shouldn't run it twice, because the OrderBy clause is added in each run, so the query would be wrong then.

Something like this can be easily converted to C# and used in some web event receiver (WebProvisioned).

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top