none
Web Part Filter Data Connections - Wildcards?

    Question

  • I have two web parts on a page and I use the web part data connection in the normal way to allow a value entered in the first to act as a filter for the records in the second.

     

    What I want is to allow a wildcard filtering which will return records matching any value in the designated field that begins with the value specified in web part 1.

     

    Can this be done, and if so, how?  I presume that I don't need AJAX enabled.

    Monday, July 21, 2008 5:32 PM

Answers

  • What I have done is use SharePoint Designer to insert a Data Source into the page that looks up the values from the List I want. Then I set a Parameter for that control that links to the value entered in a textbox control in a Form web part.

    Finally, I set a filter on the Data View that compares the value of the Parameter with the relevant field using "Begins with".
    Wednesday, July 23, 2008 12:59 PM

All replies

  • What I have done is use SharePoint Designer to insert a Data Source into the page that looks up the values from the List I want. Then I set a Parameter for that control that links to the value entered in a textbox control in a Form web part.

    Finally, I set a filter on the Data View that compares the value of the Parameter with the relevant field using "Begins with".
    Wednesday, July 23, 2008 12:59 PM
  • Hi Mike, would you be able to go into a bit more detail on the steps you took to accomplish this?

    Thanks!

    Andrew

    Tuesday, January 27, 2009 10:13 PM
  • Hi Andrew,

    I have just implemented this solution -

    You need to open a page in SPD that you want the filter and list available on.  (don't add the list via the browser).

    Then in SPD at the top right window select the 'Data Source Library' tab

    Find the list/library you want on the page and if you want specific columns select "Show Data" or if you want the standard columns just drag it from the "Data Source Library" tab to the web part zone.  If you are in the "Data Source Details" tab select the columns you want (if you CTRL click the columns in the order you want they will be added in that order) and then drag them to the web part zone.

    Then you need to insert a "Form" under Form Controls from the Toolbox (I did this to a different web part zone).  Add an "Input (Text)" box (or as many as you need for the columns you want to filer on to the form section.  Note the names of the boxes.

    On the list you added go into "Common Data View Tasks" and then Filter.  Add the new filters for each text box you added and for the value you will need to create new ones for each text box using the text boxes name you noted down.  If you have more than one filter use the Or function.  I used "Contains" for the Comparison option so users don't need wildcards which wouldn't work anyway.

    That should be it.  Save and test the page in the browser.

    Hope that helps.




    • Proposed as answer by Peter England Thursday, March 12, 2009 12:54 PM
    • Unproposed as answer by Mike Walsh FIN Friday, July 01, 2011 12:39 PM
    Thursday, March 12, 2009 12:54 PM
  • Hello,

    Are you able to do this with the form inside of the web part?  I can't see to get this to work unless I take the form fields outside of the web part, which doesn't work for me, because I'd like to save this web part so that it can be imported into other pages. 

    Thank you.

     

    Thursday, May 27, 2010 5:51 PM
  • Peter, I am hoping you can help me.  I am trying to do the solution you provided above and it is not working. 

    1. I inserted a dataview of my library in one web part and then inserted a form in another webpart. 
    2. I title the textbox "emailsubject".  I am trying to do a "contains" filter on the E-mail subject field in a library.
    3. I went to the library dataview and clicked on "filter"
    4. I put where "E-mail subject" > "contains" > and then clicked on create a new parameter.
    5. I titled it EmailSubject", parameter source: form, form field: emailsubject

    When I go to my page, I put in a keyword that I know is there but it doesn't pull up anything.  It doesn't even pull up an exact match.  Did I create my parameter wrong?


    -Cynthia Trevino

    Friday, March 09, 2012 11:13 PM
  • How do these instructions differ in SharePoint 2010? Trying to do this and not having much luck here...
    Tuesday, May 15, 2012 9:57 PM