Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a relatively small SharePoint list. When a user comes to the list page I want a generalized list to display with a search box. I want this list to have no parameters or variables attached to it so that it can be wildcard (*) searched. This way whenever the wildcard is inserted into the search box the default list displays all results.

This page will have a second list view with several parameters and filters already set on it. When someone types the search criteria in the parameters and filters goes to work searching for what the person is looking for.

I have both list views already set up.

How do I set the page (programmably) to toggle between my list views based on the url parameter value.

Example: http://mysite.com/allitems.aspx?search=all default view shows all results.

http://mysite.com/allitems.aspx?product=fruit shows only the product listings that are fruit

share|improve this question
    
I updated the title to more accurately reflect your question. –  PirateEric May 9 '13 at 23:18

2 Answers 2

up vote 1 down vote accepted

You could use jQuery to grab the parameter and hide or show the web part.

Though it may be simpler to change how you link to the page. Instead of changing the parameter link to the view you want to see?

share|improve this answer
    
Dave I think you may have hit the nail on the head with your suggestion to interlink the pages with the different views. I essentially already have both pages complete. All I would need to do is check the javascript and jQuery to insure that the search criterias are pointing to the correct view. Thank you. –  Taber-Brown May 10 '13 at 12:32
    
Also I wanted to let you know that your answer essentially answers my other question on a related topic. I thought you may want to post your answer here. sharepoint.stackexchange.com/questions/67713/… –  Taber-Brown May 10 '13 at 12:35
    
That is great news - well done –  Dave Paylor May 10 '13 at 21:22

It sounds like you might be looking for either the Text Filter Web Part or the Query String Filter Web Part which do something pretty close to that. It doesn't change the view but it does filter the results based on the text entered.

share|improve this answer
    
Thanks Dave, that was my initial thought as well. However, neither seem to be working with the listview webpart that has all of the filters and parameters. If you could provide me to a method that will work with this part I would be fine. The problem here is I already have sever parameters and filters in place through SharePoint designer. –  Taber-Brown May 9 '13 at 20:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.