I have a SharePoint list and would like to create a view that shows me all the items that are modified in this week. SharePoint views can be filtered, so I thought this wouldn't be a big deal. Unfortunatly.
I had the idea to create a filter related to [Week]. But the SPS/WSS filter criteria cannot accept [Month] or [Week], only [Today] and [Me] on the creating new view's filter section.
This post is based on SPS 2003/WSS 2.0. I don't know if its applicable to MOSS/WSS 3.0.
This is how to create the filter (based on this article):
- Go to the List;
- Select 'Modify Settings and Columns';
- Select 'Create a new view ';
- Select 'Standard View' ;
- Give the view a name;
- In the filter section, select 'Modifed' and select 'Equal' and type '[Today]';
- Save the new view;
- Open FrontPage 2003;
- Open the webpage containing the list, for example:
http://localhost/testapp/Lists/My Issues/Closed%20Last%20Month.aspx
- Switch to the code view;
- Locate below:
<Where><Eq><FieldRef Name="Modified"/><Value Type="DateTime"><Today/></Value></Eq></Where>
- Replace it with:
<Where><DateRangesOverlap><FieldRef Name="Modified"/><FieldRef Name="Modified"/><Value Type="DateTime"><Week/></Value></DateRangesOverlap></Where>
- Save the changes, its done.
PS You can also create the filter for a month. In order to do that, replace the bold text 'Week' to 'Month'.