AutoComplete Issue.

Aug 26, 2008 at 6:04 PM
Edited Aug 26, 2008 at 6:55 PM
Installed Fine.

Set up column fine...

When I go to the column properties I get a box to type in but no drop-downs? Is there a specific name I have to use or format for the originating column from which the dropdown derives its data?

It does say "Please wait while scripts are loaded...." ... forever....

Any help is much appreciated,

Sep 17, 2008 at 5:43 PM
Any luck with this?
Dec 4, 2008 at 7:20 PM

There is a bug in the web service. It was written with the assumption that there would only be one site collection and that collection would reside in the root directory of your site. Thus, when the web service goes to parse the URL to glean the Site, Web, and List GUIDs, it ends up getting the wrong values. Here's how to fix it:

  1. Go to the ISAPI directory in your 12 Hive.
  2. Find and open the SmartToolsAutocompleteTextFieldService.asmx file for edit.
  3. Add "using System.Text.RegularExpressions;" amongst the other using directives near the top of the file.
  4. Replace the contents of the GetItems(string, int) method with the following:
    string url = HttpContext.Current.Request.RawUrl;
    List<string> s = new List<string>();
    string guidPattern = @"/([0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12})";
    Regex rx = new Regex(guidPattern + guidPattern + guidPattern, RegexOptions.Compiled);
    GroupCollection g = rx.Match(url).Groups;
    string siteID = g[1].Value;
    string webID = g[2].Value;
    string listID = g[3].Value;
       using (SPSite site = new SPSite(new Guid(siteID)))
           using (SPWeb web = site.OpenWeb(new Guid(webID)))
             SPList list = web.Lists[new Guid(listID)];
             SPQuery query = new SPQuery();
             query.Query = "";
             query.RowLimit = Convert.ToUInt16(count);
             query.Query = string.Format("<Where><BeginsWith><FieldRef Name='Title' /><Value Type='Text'>{0}</Value></BeginsWith></Where>", prefixText);
             foreach (SPListItem item in list.GetItems(query))
    //catch (System.Web.Services.Protocols.SoapException se)
    //   s.Add(se.Detail.InnerText);
    //catch (Exception ex)
    //   s.Add(ex.Message);
    return s.ToArray();

    The commented sections can be used to help debug other problems you may be having.

  5. Save the file.
  6. Restart IIS or recycle the app pool which the SharePoint site is running under.

Hopefully, Jan will be able to incorporate this bug fix in a new release of Autocomplete soon.

Dec 4, 2008 at 7:22 PM
D'oh! Sorry, that won't fix the drop-down for the column properties.