Lookup column question
Hi all,I have running into a problem with SharePoint's Look up column.I have created a list which contains a list of courses which we offer for training (25 courses)I then created another list which is used for students to register a course. This list contains a field 'course' which I specified as a lookup column and linked it to the first list to get the list of courses available. When I create a new item using this list, I found that my 'course' field which suppose to be a dropdown list of the courses in the first list is not working (i.e. clicking on the error & the list won't show up).After many playing around & testing with different list, content type, list type, column type etc, I finally figured it out that when my course list contains more than 19 items, the dropdown will stop working. So there must be a limit number of items can be used for lookup column (20 from my test as there is an empty record as default).My questions is has anyone had this problem before? and is there anywhere I can change the limit?Please help.Thank you.
October 23rd, 2008 9:13am
While I can't say what is happening in your situation I can tell you that personally I have look up columns running right now with hundreds of options.Out of curiousity what is the 20th entry? Does it contain special characters?Have you tried seeing what happens if you set up the lookup column for multiple values to see if the result is different when rendering in a listbox as opposed to a dropdown? If an error is occuring can you provide more information on it?Also it is probably a good idea to check the SharePoint logs and event viewer of the server to see if it captures more details.Sorry I couldn't help yet, but hopefully with some more information we can pin point the issue.
Free Windows Admin Tool Kit Click here and download it now
October 23rd, 2008 3:43pm
Hi, Thank you for your reply.Here is what I have done to test:I created the simplest 'custom list' then add nothing else to that so it only has one 'title' field. I then create a list add a 'lookup' column to show the title field, then I created items up to the 19th one (the values are just simple 1 to 19) then I added item number 20 (which is '20'), then suddently the dropdown box stoped working. (by stop working I mean, when you click on the arrow, the list will not show, but you can input the value into the field)I have tried with allwoing multiple selection & it works fine with more than 20 items. I have also found out (with helpof someone fromanother newsgroup) that the dropdown list actually works fine in firefox but just not IE! I was also told thatUnder 20 items, the lookup is a select tag with options. Above 20 items, it is an input tag. I am kind of confused, is this a problem with SharePoint or IE?My question is: is it possible to make it a slection tag for above 20 items as well? can it be fixed so it works on IE as well? Majority of my users are using IE & I can not rely on them to input the correct value either. Thank you for your help.Bing
October 29th, 2008 2:10am
Hello Bing,I wish I could copy paste images into here...Anyways, basically you can customize your own field control that would work the same way if you really want. Thisis a developer task and is pretty much as easy (if not easier) than building a webpart.That IE control SHOULD show the drop down (it does on my computer here running under IE 7, and I also tested IE 8 (beta 2)). The key is that it also does 'smart' advice based on what you input. So in your example when I type the number 1 in that field it should automatically show drop down options for ANY item that starts with the 1 character. So it may look different (because it accepts input) but it should also allow you to use the typical drop down methods as well.This is by design because when you have more than 20 items it's assumed the user doesn't want to scroll through potentially hundreds of items in the lookup. By typing in the first letters and providing possible results it improves user experience.So what I am saying here is it's not SharePoint, and most likely not IE that is causing the issue. Keep in mind that if your browser does not have certain javascript/activex abilities turned on SharePoint can behave differently. It's always a good idea to add SharePoint as a trusted site or intranet site to make sure the browser settings do not hamper your use of SharePoint. I would check IE browser settings to make sure it's not something like what I mention here.If you are using a different version of IE than what I mentioned and for some reason users are not able to be upgraded to IE 7 please let me know and I will do further testing on an older IE browser to ensure my assumptions are correct.Hope this helps,Richard
Free Windows Admin Tool Kit Click here and download it now
October 29th, 2008 4:12pm
Hi Richard,Thank you for your help, I really appreciate it.I am using IE7 but on my computer the drop down does not 'drop' & when I type in, it also does not show up the options& I have to type in the exact value otherwise it will say "Value is not among the set of valid lookup values." (So for my real list this is not feasible because I am intend to create a training register list & the lookup field would be the course title, they are quite long & I can't expect user to know the exact name. )I have added my sharepoint site in the local intranet site, no help. I notice in IE, when after I click on the drop down box arrow I get an error down the bottom of the window, and it says ' Line 2210 Char 2 Object required ' I checked on my Newform.aspx page, there is no line 2210. Really stuck here. I am not a developer, I try to avoid writing code as much as I can, everything else on the list does exactly what I want except this problem :(Bing
October 30th, 2008 7:53am
Are you using a custom master page?It sounds like the page is looking for a javascript reference and cannot find it. Odds are a javascript file is missing from being loaded on the page.If you can debug the page it might show you what js line is erroring out or what call is erroring. I know this is possible with Visual Studio, don't know what tools you have available.I don't think you need a full out custom code solution for this, it's probably something we can resolve once we discover why it's happening.Let me know if the master page or js makes sense or you think could also be the cause,Richard
Free Windows Admin Tool Kit Click here and download it now
October 30th, 2008 3:03pm
Yes, you are facing real problem with MOSS2007, once you add > 20 or more ntries in lookup- it might not work properly, try using SP 1 of MOS2007, And enjoy.
November 4th, 2008 10:58am
I just ran into the same problem. It took me a whole to find an answer. Since i was using a custom master page , after reading this post i change the master page and everything worked fine. This resolve the issue that the problem is in the mater page. I added the follwingtr tag and it works fine .<tr style="z-index: -3; position: absolute;"> <td colspan=4 class="ms-globalbreadcrumb" style="z-index: -3"><span id="TurnOnAccessibility" style="display:none"> <a href="#" class="ms-skip" onclick="SetIsAccessibilityFeatureEnabled(true);UpdateAccessibilityUI();return false;"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,master_turnonaccessibility%>" EncodeMethod="HtmlEncode"/></a></span><A href="javascript:;" onclick="javascript:this.href='#mainContent';" class="ms-skip" AccessKey="<%$Resources:wss,maincontent_accesskey%>" runat="server"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,mainContentLink%>" EncodeMethod="HtmlEncode"/></A> <table cellpadding=0 cellspacing=0 height=100% class="ms-globalleft"> <tr><td class="ms-globallinks" style="padding-top: 2px;" height=100% valign=middle> <div> <span id="TurnOffAccessibility" style="display:none"><a href="#" class="ms-acclink" onclick="SetIsAccessibilityFeatureEnabled(false);UpdateAccessibilityUI();return false;"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,master_turnoffaccessibility%>" EncodeMethod="HtmlEncode"/></a> </span> <asp:ContentPlaceHolder id="PlaceHolderGlobalNavigationSiteMap" runat="server"><asp:SiteMapPath SiteMapProvider="SPSiteMapProvider" id="GlobalNavigationSiteMap" RenderCurrentNodeAsLink="true" SkipLinkText="" NodeStyle-CssClass="ms-sitemapdirectional" runat="server"/> </asp:ContentPlaceHolder> </div> </td> </tr>
Free Windows Admin Tool Kit Click here and download it now
June 24th, 2009 12:37am
I came across the same problem. What caused it for me was a simple position:relative for one of the container DIVs in my custom css. That broke the whole lookup functionality if there were20 items or more. So maybe a tip for those who have the same problem: disable your custom CSSto check if that fixes the lookup column problem. If it does: search for positioning of your DIVs.
Good luck.
December 2nd, 2009 3:40am
Thank you andreasbbbbb your answer solved my problem.
Free Windows Admin Tool Kit Click here and download it now
February 1st, 2011 1:11pm
Who you are who is unlocking threads I have locked. STOP DOING IT.
The OP's question was answered by a poster in 2009.
Thus the thread ought to be locked. Even follow-up posts have been answered.
There is NO reason for unlocking this thread. I take great care to only Lock threads that ought to be locked.
Stop messing up my hard work like this NOW.
Mike WalshSP 2010 "FAQ" (mainly useful links):
http://wssv4faq.mindsharp.com/default.aspx
WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx
Both also have links to extensive book lists and to (free) on-line chapters
February 1st, 2011 4:24pm
Who you are who is unlocking threads I have locked. STOP DOING IT.
The OP's question was answered by a poster in 2009.
Thus the thread ought to be locked. Even follow-up posts have been answered.
There is NO reason for unlocking this thread. I take great care to only Lock threads that ought to be locked.
Stop messing up my hard work like this NOW.
Mike WalshSP 2010 "FAQ" (mainly useful links):
http://wssv4faq.mindsharp.com/default.aspx
WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx
Both also have links to extensive book lists and to (free) on-line chapters
Free Windows Admin Tool Kit Click here and download it now
February 1st, 2011 4:24pm