Loading...

Passing date parameter to CAML filter

Passing date parameter to CAML filter

  • This topic is empty.
Viewing 4 reply threads
  • Author
    Posts
    • #4797
      Anonymous
      Anonymous
      Participant

      Hi Jeff,

         From where you want to pass the dates?

    • #6719
      Anonymous
      Anonymous
      Participant

      I have a web part page that the user is interacting with.  On there in some type of webpart, I need to have the user enter a valid date / select from a date widget.  The date needs to be converted to ISO 8601 format and fed to the CAML filter of a chart (to show data from between the two dates) and a ListView (to show line item data between the two dates).  As i mentioned above, I have used a qselector to show the user a dropdown list that is then passed by session variables to the CAML filter.  In this case, the qSelector will not work since not all possible dates can be stored in the list.

    • #6734
      Anonymous
      Anonymous
      Participant

      What I finally did

      Create a new List  (report Inputs)

      Create a new qlistform to allow the entry of the information

      – passed the information through Session

      – Next page hyperlink points to the report

      On the report page

      – added a qlistform (display) to the top to show parameters.

      – Set CAML filter to read session information

      Added an edit form to allow the user to change parameters

    • #3885
      Anonymous
      Anonymous
      Participant

      I am looking for an easy way to pass a user entered date range into a qListView and qChartView web part.  I have in the past used the qSelector control to allow the user to select year and quarter from a predefined list  and have them passed as session variables.  Is there a similar approach that can be taken here???  I have tried to use a date control but ran into 2 problems,  First I was not sure how to get them into a session variable, and second the CAML filter wants the dates in ISO8601 format.  I have looked at having a page before the report and passing the parameters via HTTP, but the new values are not recognized before the form is saved.  I would prefer to do this without saving a row to an intermediate list.  Any suggestions would be appreciated!!!

    • #6735
      Anonymous
      Anonymous
      Participant

      I'm glad you found a way to do it.

      This workaround will help other people.

Viewing 4 reply threads

You must be logged in to reply to this topic.