Loading...

qsilistview limit returned items created today and yesterday

qsilistview limit returned items created today and yesterday

  • This topic is empty.
Viewing 8 reply threads
  • Author
    Posts
    • #5364
      Anonymous
      Anonymous
      Participant

      Hi ,

      Since you're using qSIListView you need to filter that data at the stored procedure/query level (recommended way).

      There is another option and that is Complex Filter. Please check our documentation for more details.

    • #6078
      Anonymous
      Anonymous
      Participant

      already using complex filter – I see where we can Add to a date – I'm looking for an easy way to subtract from the date.  If we have to do it with a SP/Method sobeit – just thought there might be someone smarter than me that figured this out.  I can show everything for the current day – just want to include prior day activity as well.

      mike

    • #4421
      Anonymous
      Anonymous
      Participant

      Hi,

      We have SP2010 and Quest web parts 5.7.  Using the qsilistview we are trying to set a complex filter to limit the return values to those happening on the current day and the day prior.  may we try something like this:

      incidentdate>SubtractDays[TODAY, 1]

    • #6077
      Anonymous
      Anonymous
      Participant

      Hi ,

        From the performance point of view filtering the data at the server (SQL, Oracle, etc) level is recommended.

      Also is easier to build your filter condition at the server level instead of using the Complex Filter.

    • #5366
      Anonymous
      Anonymous
      Participant

      Hi ,

      CAML filtering is pretty efficient from a SharePoint perspective.  You should be able to set the CAML Filter property to something like "where datefield equals today or datefield equals today minus one".

    • #6080
      Anonymous
      Anonymous
      Participant

      Hi Joseph,

        uses qSIListView wp and it has no CAML Filter property.

      Your idea is good and it works for qListView.

    • #6079
      Anonymous
      Anonymous
      Participant

      Oh, okay, sorry I misread the post.  Yes, filtering at the sql query level would be the most efficient way to do this then.  Thanks for the clarification.

    • #5368
      Anonymous
      Anonymous
      Participant

      add this to the complex filter:

      datefield=[TODAY] OR datefield>=AddDays([TODAY], -1)

      Documentation on the complex filter:

      http://documents.quest.com/QB18585

      FieldName comparison-operator FieldExpression

      Comparison operator is one of these: =, <> (not equal), <, >, <=, >=, LIKE

      FieldExpression can be one of the following:

      String – A string is enclosed with single quote; for example 'Accounting'. A string can contain wild-card character % or * when used in conjunction with the LIKE operator. For example: 'M%', 'M*'. A wild-card character is not allowed in the middle of a string. Therefore, this expression is illegal: 'Te*xt'

      Numbers – Numbers are not enclosed. For example: 20, 20.5, 0.5. If you enclose a number with a single quote, it will be treated as string.

      Dates – For example: February 5, 2005 11:50 PM is #2005-02-05T23:50:00Z#.

      [ME] – This expression will be replaced with the name of the currently logged-in user.

      [TODAY] – This expression will be replaced with midnight of today's date.

      [NOW] – This expression will be replaced with the current date and time.

      Date function – The following date functions are supported: AddSeconds, AddMinutes, AddHours, AddDays, AddMonths and AddYears. Their syntax is DateFunction(dateValue, number). For example: AddDays([TODAY], 7) adds 7 days to today's date

    • #6082
      Anonymous
      Anonymous
      Participant

      thanks Carl!  tried this and it works!

Viewing 8 reply threads

You must be logged in to reply to this topic.