This project has moved. For the latest updates, please go here.

Combining SPAutocomplete with SPDisplayRelatedInfo

Sep 13, 2013 at 1:55 PM

I am using SP2007 and have setup a form which has an input field: "Enter ID" which is used in conjuction with autocomplete.

My question is can Autocomplete be used inconjuction with SPDisplayRelatedInfo. If not, can it be used to filter a dropdown?

My attempted syntax is below:

$(document).ready(function() {
                sourceList: "{65FA9BA9-5323-4379-B46D-A9E54054D729}",
                sourceColumn: "Title",
                columnName: "Enter ID",
                filterType: "BeginsWith",
                numChars: 2,
                ignoreCase: false,
                highlightClass: "",
                uniqueVals: false,
                slideDownSpeed: "fast",
                debug: true
        columnName: "Enter ID",
        relatedList: "{65FA9BA9-5323-4379-B46D-A9E54054D729}",
        relatedListColumn: "Title",
        relatedColumns: ["Name", "Manager"],
        displayFormat: "list"

Many thanks for the help in advance.
Sep 13, 2013 at 2:07 PM
In earlier versions of SPServices, SPDisplayRelatedInfo worked with Single line of text columns, but it was sort of an accident and I don't believe it does anymore.

That said, you can certainly do what you want. It probably will just take some coding.

Sep 13, 2013 at 2:13 PM
Edited Sep 13, 2013 at 2:14 PM
Damn it doesn't look like it works. I wish I had the coding know how to try and make it work.

Thanks for the prompt response.
Sep 13, 2013 at 2:30 PM
The way you'd do it is to hook into the blur event for the Enter ID column and then use GetListItems to fetch the item with that ID. I've done similar stuff, but frankly, I usually end up using jQueryUI's autocomplete because it's far more full-featured.