Friday, March 21, 2008 1:47 PM Jan Tielens

Introducing the Autocomplete Text Field for SharePoint 2007

Yesterday I finally had some time to finish a project I've been working on for some time: the Autocomplete Text Field for SharePoint 2007. Click here for a small demo screencast on Soapbox, or download the high resolution video from the CodePlex site.

The idea is pretty simple: you've got a SharePoint list (or document library) that contains some interesting lookup data, now you can make use of the Autocomplete Text Field to display a textbox to the user that will show a dropdown list of items that start with the text the user already entered. When the user types more (or less) text, the dropdown list will adapt to that and update the contents. All of this is made available as a new column type (aka custom field type) in SharePoint 2007. The beauty of this field is that it doesn't need to do a page postback to refresh the data, the ASP.NET AJAX extensions are used to fetch the data in the background.

When the column is added to a SharePoint list or document library, the user can customize by defining various settings:

  • Column name: the name of the column
  • Description: the description of the column
  • Required: if the column should contain text or if it can stay empty
  • Lookup list: the list in which the column should do the lookup, this list can be selected from a dropdown
  • Autocomplete interval: the number of milliseconds after which the lookup list will appear
  • Items to display: the maximum number of items to display in the lookup list
  • Minimum prefix length: the minimum number of charactes which should be typed before the lookup list will appear
  • Show animations: enable or disable the fading effects when the lookup list is shown or hidden

For more information, the download and the source code; visit the SmartTools for SharePoint Codeplex site. Be aware that if you want to make use of this column, the ASP.NET AJAX extensions must be installed and configured on your SharePoint sites!! (more info here)

Filed under:

Comments

# AJAX coding school » Blog Archive » AJAX Demos [2008-03-21 14:39:41]

Pingback from  AJAX coding school  » Blog Archive   » AJAX Demos [2008-03-21 14:39:41]

# re: Introducing the Autocomplete Text Field for SharePoint 2007

Saturday, March 22, 2008 6:26 AM by Peter

Nice control Jan!

The only thing  I would like to see is that you can choose the column to display, as the normal lookup field does.

# Dew Drop - March 22, 2008 | Alvin Ashcraft's Morning Dew

Pingback from  Dew Drop - March 22, 2008 | Alvin Ashcraft's Morning Dew

# Links (3/24/2008) « Steve Pietrek’s SharePoint Stuff

Pingback from  Links (3/24/2008) « Steve Pietrek’s SharePoint Stuff

# Several very useful open source add-ons and tools for SharePoint recently released

When CodePlex, which is Microsoft's open source project hosting web site, launched almost 2 years ago,

# SharePoint Link Love: 03-25-2008 at Virtual Generations

Tuesday, March 25, 2008 5:33 AM by SharePoint Link Love: 03-25-2008 at Virtual Generations

Pingback from  SharePoint Link Love: 03-25-2008 at  Virtual Generations

# re: Introducing the Autocomplete Text Field for SharePoint 2007

Wednesday, March 26, 2008 5:21 AM by bob

Nice post and nice feature !

I haven't played with it but one cool feature would be also to be able to select the field to bound the autocomplete (for exemple this could be the title field, but also the name field, etc.).

Thanks for giving this to the community anyway !

# re: Introducing the Autocomplete Text Field for SharePoint 2007

Thursday, March 27, 2008 10:28 AM by denap

Do you think it's reasonable, performance-wise, to use the autocomplete lookup against a list with ~1500-2000 items?  

We're trying to build a drop-down control that will present a user with a selection from ~1500 items and this seems like a great way to go; if the performance is ok...

thanks

# re: Introducing the Autocomplete Text Field for SharePoint 2007

Thursday, March 27, 2008 5:25 PM by Jan Tielens

@bob: thanks for the suggestion! I will take this into account for the next version.

@denap: I don't think there's a performance issue. To optimize performance you can set the minimum prefix length to something like 4, so no unnesecarry round trips to the server are made.

# Latest SharePoint News 03.27.08 | SharePoint BUZZ

Friday, March 28, 2008 12:23 AM by Latest SharePoint News 03.27.08 | SharePoint BUZZ

Pingback from  Latest SharePoint News 03.27.08 | SharePoint BUZZ

# re: Introducing the Autocomplete Text Field for SharePoint 2007

Friday, March 28, 2008 2:54 PM by John

I am familiar with the auto complete extension of ASP.NET Ajax. I used it in non SharePoint web apps.

I'm having a problem with this field. I link it to a simple list that has a title column. The autocomplete field does not show a text box in the list item edit mode. In design mode it does show all the property controls.

What can I do to solve this problem?

# SharePoint Kaffeetasse #50

Monday, March 31, 2008 9:54 AM by SharePoint, SharePoint and stuff

Holla - schon die 50.te Ausgabe der Kaffeetasse .... Anpassungs-Projekt Building a news workbench on

# re: Introducing the Autocomplete Text Field for SharePoint 2007

Monday, March 31, 2008 12:22 PM by GPL

Why did you go GPL here (and not in any of your other CodePlex projects)?  This looks like a truely useful feature, but anything GPL can't be used in most business settings.  Bummer.

# Hecgo.com » Sharepoint Autocomplete TextField

Wednesday, April 02, 2008 2:03 AM by Hecgo.com » Sharepoint Autocomplete TextField

Pingback from  Hecgo.com  » Sharepoint Autocomplete TextField

# re: Introducing the Autocomplete Text Field for SharePoint 2007

Thursday, April 03, 2008 10:42 AM by denap

Jan, I'm not having any luck getting the lookup working.  Installed fine, shows up as a column type fine.  I have a simple list of countries I'm using as the lookup list, yet when I add a new item and enter data into the field; no response.  

# re: Introducing the Autocomplete Text Field for SharePoint 2007

Tuesday, April 08, 2008 5:14 AM by Jskim

I Can a Little English, so Understand

A little problem, though.

Installed fine, Show Column type fine,

but typing in a text box is Result to not response show

I Think Problem is Web Service not excute.

# re: Introducing the Autocomplete Text Field for SharePoint 2007

Thursday, April 17, 2008 10:54 AM by Ihatesp2007

I hate sharepoint its fucking shit!!!!!

# re: Introducing the Autocomplete Text Field for SharePoint 2007

Monday, April 21, 2008 1:40 PM by Frank

Hi, Jan.

Great work!

I've just started looking into AJAX in SharePoint, and this was one of the things I definitely wanted to look into. Now I don't have to! :-)

Thanks!

Regards,

Frank

PS!

Ihatesp2007: What are you even doing in here...?

# re: Introducing the Autocomplete Text Field for SharePoint 2007

Wednesday, April 23, 2008 10:59 AM by John

Thanks for sharing this but it's not working at all. As stated by the others, field is showing up, typing a text in it doesn't trigger any response. No error in event log nor in Sharepoint's log files.

Installed the AJAX extensions successfully and tried Mike Amerlaan's webpart example successfully too which means that ajax is well working. Trying your custom field in the same Sharepoint site is just not doing anything...very disapointing.

Cheers

# re: Introducing the Autocomplete Text Field for SharePoint 2007

Thursday, April 24, 2008 4:40 AM by john

Hello Jan,

Sorry for my message of yesterday, it works great but for some reason not in all site collections although it's in the same web application....and the solution you made is deployed accross the entire farm. Could it be related to some extra feature not activated ?

But otherwise, I tested it and it's pretty fast and pretty comfortable for the end user.

John.

# re: Introducing the Autocomplete Text Field for SharePoint 2007

Friday, May 09, 2008 12:53 PM by Bill

Hi Jan,

Is it possible to add an item to a list if it doesn't exist?  Could you have a some little option that says add new list item?

Bill

Leave a Comment

(required) 
(required) 
(optional)
(required)