This project has moved and is read-only. For the latest updates, please go here.

LiveSearch Multi-Select

Nov 14, 2012 at 9:10 PM

When playing around with CascadedDropdown I've got an idea - maybe you'll like it, too :)

At the moment I do have a simple document library with an additional column for metadata (type: managed metadata). Somewhere on our sharepoint I created a list with a lookup column referencing the documents of the library metioned above. Of course that's not very comfortable as the list may get a bit long - depending on the amount of documents located within the library.

My first approach some time ago was using "CascadedDropdown", but at that time combined with a simple list containing the "metadata". It worked for sure, nevertheless it could be better :)

But how? Well, my idea is to have a simple text input field and a multi-select area, which holds the documents. Every time the user enters a char into the input field, a query gets executed so that only the documents are visible whose title contain that char. In other words some kind of live search. The next step could be, that the column containing the managed metadata mentioned at the beginning will also be taken into account for the search results.

Now I'd like to know what you're thinking of that idea? How could that be realized?

I though of using most of the code of "CascadedDropdown" and for obtaining the correct search results "Query/QueryEx". Maybe using CAML queries is the better idea, as CascadedDropdown is already using them? Do they support queries with wildcards?

Nov 21, 2012 at 4:46 AM

Take a look at the $().SPServices.SPAutocomplete function. It's not exactly what you're talking about, but it does a similar thing.

I've used the Search Web Service to do what you're describing, showing matches as the user types. It's definitely possible.


Nov 21, 2012 at 10:24 AM

OK, using the Search Web Service works like a charm. But how do I combine the search results with SPAutoComplete?
It does not seem to have an interface for that?

Nov 21, 2012 at 2:19 PM
Edited Nov 21, 2012 at 2:20 PM

No, there's no way to do that with SPServices as it stands. I just pointed out SPAutocomplete as an example. I would recommend using jQueryUI's .autocomplete(), which is far more full-featured.