Danushka Silva

It's all about SharePoint

Dropdown get to editable mode when more than 19 records in lookup fields

When you create a lookup field to reference data from another list, you will get a dropdown control to select data from that list. If you select “Allow multiple values” you will get a list box control with two buttons which you can select values. But have you ever seen an editable dropdown OOTB in SharePoint? I don’t think so. If you need to add an editable dropdown then you have to come up with your own custom control.

When you add more than 19 records to the lookup list, SharePoint automatically makes that dropdown list editable. This is because when you have lots of items in the dropdown, It’s very difficult to find an appropriate item. So SharePoint allows you to type in the dropdown and it’s automatically sorted. This is not a bug. This is a feature in SharePoint.

Let’s see some screenshots.

2010-06-18_164913

OK… I have two lists. “My Favorite Colours” has a lookup field to “My Colours”

2010-06-18_165801

“My Colours” has some colours in the list.

2010-06-18_165902 

Added the lookup field to “My Favorite Colours” list

2010-06-18_165922

When “My Colours” has 19 records, “My Favorite Colours” list’s edit form shows usual dropdown box (Un editable)

2010-06-18_170647

But when we added more than 19 it’s automatically gets to editable. You can type and it’s automatically gets sorted according to the typed character.

2010-06-18_170822

I know what you think now. Users can type any value and save to the list without checking the lookup values. Don’t worry SharePoint automatically checks the value and show an error message.


Please add a comment if you use this code or it helped you. So I can make my posts better.