Loading...

QueryString parameter to filter our qLIstView data

QueryString parameter to filter our qLIstView data

  • This topic is empty.
Viewing 7 reply threads
  • Author
    Posts
    • #5503
      Anonymous
      Anonymous
      Participant

      This can be done easily by using the CAML filters.

      EXEdit -> Display -> CAML FIlter -> Edit

      Add a new condition and under the edit options you can select which field in the list will be the index based off of the query string.

      Under "Value Source" select HttpParameter and under source name type in what the query string variable is refered to (e.g. foo.com?q=bar then the variable would be q).

      edit: I just saw that your post reference Calendar View.  What I wrote works for list view, it should be applicable to the calendar as well.

    • #5570
      Anonymous
      Anonymous
      Participant

      Thanks so much, i will give it a try!

    • #5571
      Anonymous
      Anonymous
      Participant

      Hi John,

      I tried the solution you suggested – works as a charm. I only have one additional question.

      Is it possible to have this CAML filter optional? In case no parameter is passed in the QueryString, no CAML filter is applied?

      Or maybe you can suggest a HttpParameter's value to pass in my QueryString in those cases when i don't want CAML filter to be applied? Because if i do have CAML specified and I don't pass anything after ".aspx?" – I get "No records found", but I just want everything returned in this case. Any ideas would be appreciated.:)

      Thanks a lot,

    • #5572
      Anonymous
      Anonymous
      Participant

      I personally haven't tried this myself but it's on my list of things to implement.  Let me play around with it locally first and see if I can come up with anything, there's nothing off the top of my head that I can think of.

    • #5573
      Anonymous
      Anonymous
      Participant

      Thanks a lot John. Will be glad if you can suggest something. Otherwise I will have to replicate the page and just specify CAML on one of the pages, which I want to be a very last option ( since i will need to do customizations in 2 places down the road).

    • #5574
      Anonymous
      Anonymous
      Participant

      I spent some time playing around with this, trying to get it to work in a simple way and wasn't able to come up with anything.

    • #4598
      Anonymous
      Anonymous
      Participant

      Hi ,

      I need to be able to filter out a set of data based on a parameter, which is passed in QueryString. Is there a way to do that? if yes, how?

      Thanks a lot,

    • #5575
      Anonymous
      Anonymous
      Participant

      Thanks a lor John. Due to the time constraints, i went ahead and created a second page, where i specified the CAML query. But in any case i really appreciate your assistance earlier in this thread (on 1/23) – your suggestion helped me to get where i needed to be

Viewing 7 reply threads

You must be logged in to reply to this topic.