Loading...

Quest WebParts set filter to only show current month

Quest WebParts set filter to only show current month

  • This topic is empty.
Viewing 3 reply threads
  • Author
    Posts
    • #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

    • #7205
      Anonymous
      Anonymous
      Participant

      I started with method 2 to add fields for Start Week, End Week, Start Month, End Month within the SharePoint List. Now how do I tell Qwest WebParts to filter by these? Method 3 then?

    • #3869
      Anonymous
      Anonymous
      Participant

      Was wondering if someone could help me here. I’m trying to build a QChart to display just items within the current month. How do you setup this logic is Quest WebParts? ]

      Any help is greatily appreciated

      -Anthony

    • #7207
      Anonymous
      Anonymous
      Participant

      <And>
        <Geq>
          <FieldRef Name="Week_x0020_Start" />
          <Value Type="DateTime">[TODAY]</Value>
        </Geq>
        <Leq>
          <FieldRef Name="Week_x0020_End" />
          <Value Type="DateTime">[TODAY]</Value>
        </Leq>
      </And>

Viewing 3 reply threads

You must be logged in to reply to this topic.