- This topic is empty.
- 01/22/2014 at 10:15 am #5503
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.
- 01/22/2014 at 11:30 am #5570
Thanks so much, i will give it a try!
- 01/23/2014 at 10:03 am #5571
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,
- 01/23/2014 at 10:10 am #5572
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.
- 01/23/2014 at 10:18 am #5573
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).
- 01/30/2014 at 3:51 am #5574
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.
- 01/30/2014 at 6:55 am #4598
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,
- 01/30/2014 at 6:55 am #5575
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
You must be logged in to reply to this topic.