Loading...

RE: Quest WebParts set filter to only show current month

RE: Quest WebParts set filter to only show current month

Home Forums QuickApps Forum Quest WebParts set filter to only show current month RE: Quest WebParts set filter to only show current month

#5132
Anonymous
Anonymous
Participant

Filtering for the current month is tricky, but it may possible 3 different ways:

1) Add the date field to the "Searched FIeldss" using ezEdit which lets the user filter fields between the start of the current month and end for the current month.

2) Filter based on a calculated field that you create for your list which indicates if the date is in the current month as described her:

http://blogs.msdn.com/b/sharepointdesigner/archive/2008/08/01/date-functions-in-calculated-fields.aspx

3) Using a CAML filter to do this is a little more tricky as there is an undocumented CAML function (DateRangesOverlap), that can return the current month, but the CAML filter may have a glitch.  As described here:

http://pholpar.wordpress.com/2008/03/04/using-month-element-in-daterangesoverlap-can-return-items-not-in-the-specified-month/

Using ezEdit, paste the CAML filter below into the CAML text box on the first configuration page of the qChartView CAML text section (be sure to change the date field in the CAML to the name of the date field you want to filter on).  Note: Quest Web Parts can use any valid CAML statements even if the CAML is not created by the Quest Web Part CAML Editor.

<DateRangesOverlap>
     <FieldRef Name='Date' />
     <FieldRef Name='Date' /><Value Type='DateTime'><Month /></Value>
</DateRangesOverlap>

Please respond, if any of these 3 approaches work for you.

Curtis Kelly

PM, Quest Web Parts for SharePoint