Two years ago, while SharePoint 2010 was still in beta, I released Search Suggest for SharePoint 2010 lists. A number of people contacted me with various bug reports and feature suggestions. Finally, I found some time and refactored this old code to accommodate your suggestions.

Changes

  • Improvement: You can now define list columns (fields) to be queried
  • Improvement: You can now customize the display format
  • Fixed bug: Values from External Data Columns are not shown
  • Fixed bug: Web part is slow when querying a large list
  • Fixed bug: Trying to use a SPWeb object that has been closed or disposed and is no longer used.

Installation

Search AutoComplete for SharePoint Lists is a SandBox solution and can be deployed to any farm environment. If Sandbox solutions are disallowed for your site collection, contact your farm administrator.

UPGRADE: If you already have a previous version, uninstall it, and then re-add the solution.

  • Download and unpack solution package (it also available as open source project on CodePlex)
  • Go to your Site CollectionSite ActionsSite Settings
  • Browse GalleriesSolutions
  • Go to Solutions ribbon tab and click Upload Solution
  • Upload the WSP package you downloaded and Activate it
  • Open a SharePoint web page and Insert a web part
    (from CustomSearch AutoComplete for Lists)

Configuration

You can configure this web part via web part tool pane. Use the following settings from the Search section:

  • List name – Enter list name that you want to search
  • Display Fields Format – Enter fields whose value you want to display. Use static field names.
    Each field must be in square brackets. E.g. [FirstName] [Title] (phone [WorkPhone])
  • Query Fields – Fields that will be queried. Separate fields with semicolon. Use static field names. e.g. Title;FirstName;WorkPhone

Additional appearance options can be found in the Miscellaneous category.

Configuration Examples

The following table lists suggested configurations for default SharePoint lists (English template).

List Type Query Fields Display Fields Format Sample Output
Contacts Title; FirstName; WorkPhone [FirstName] [Title] (phone: [WorkPhone]) John Wayne (phone 816-555-1014)
Doc. Lib FileLeafRef [FileLeafRef] Sales Document.docx
Tasks Title [Title] Approve document
Links URL [URLNoMenu] http://bing.com, Bing.com

One Comment

  1. Brett Says

    Thanks for this. It works great.
    The Sandbox solution is very handy although when installing the web-part on a subsite, I needed to copy the JQuery folder to that subsite for it to function and display correctly.

Leave a Reply