Connected Lookup Field


 


Introduction


The attached code demonstrates the extended lookup field. Such field can be used to display any hierarchical structures, such as org charts, city-stat-country chains etc.


The biggest challenge and advantage of implemented design was to build a Connected Lookup Field as a listener to other Connected Lookup Fields. In contrast with multi-value column, each field is a separate column itself. That allows use of built-in WSS functionality such as filtering and sorting by column.


This version will work for lists <1000 items.


Install


run setup.exe


 


 


Configuration


In the current release all connected columns must be sourced within the same SharePoint list. The list can be loaded from a different SP Site though. I used a built-in Contacts list with populated geographical locations.



 


Add Connected Lookup Fields to your list. “Get Information From” should point to your source list (above).


“Value Column” is the actual column this field will display. “Parent Column” when is not empty, indicates that the “Value Column“ depends on another column. This implies that the list will contain another Connected Lookup Field, where the Parent column is a Value column.


“Broadcast Value” should be checked on the Parent Connected Lookup Field. It indicates that the column value will be published, thus listeners can watch for it.


 



 


Adding 3 columns in my example as:

























Field name


Parent column


Value column


Broadcast value


Country


N/a


Country


Yes


State


Country


Sate/Province


Yes


City


Sate/Province


City


No


The desired functionality as connected dropdowns is shown in New and Edit forms .



After the target list populated, each of the Connected Lookup Fields renders as a separate column.


 


TBD

ConnectedLookupField v.3.1.zip

Comments (83)

  1. David Marsh says:

    I followed your readme text file instructions for deployment of this custom field type but I get the following error:

    Could not load the assembly ‘ConnectedLookupField’. Make sure that it is compiled before accessing the page.   at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError)

      at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly)

      at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData)

    I even tried adding a Safe Control entry to the web.config in case it needed it.

    Is there any chance this code can be made available on CodePlex to obtain the source code and possibly extend its functionality?

    If not can you please advise on any steps I may of missed to successfully deploy this.

    Thanks.

  2. vervoorttom says:

    I too get this error message. After installing, the connected lookup appears in the list of available fields on the create column page. But when I select the radiobutton in front of it, this error is thrown.

    Can you please fix this ? It seems to be a very nice field I really would like to use in my environment.

  3. vervoorttom says:

    I got it working now, by changing the inherits attribute in the ascx file to Inherits="Microsoft.SharePoint.ApplicationPages.ConnectedLookupFieldEditor, ConnectedLookupField, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3f0230fcb857a1b0".

    However, it is still VERY buggy. If you have more than 3 levels, the page returns an error. I tested with 3 levels and was able to create some list items without problems. Then when I edited an item I got another error saying the item was not in a list or something similar.

  4. leonidly says:

    The updated version with some  fixes will be out in a couple of weeks.

    To avoid some of the dll-related issues, put a dll into a bin folder as well. Prefered way to troubleshoot is in fact not using GAC, rather setting a full trust in web config and saving a dll in the bin folder.

  5. Hysen says:

    Will your updated version allow multiple selection?

    Can this column be added through the site columns? Now i am not able to do that.

    I have a requirement to allow multiple select in connected lookup. I am waiting to try your next release.

  6. leonidly says:

    A new version is posted. Updates are:

    + Automated install as a solution (into BIN folder)

    + 20 items limit increased to 1000

    + more than 3 nested levels allowed

    No multiple selection in this release.

  7. tjroyer says:

    This is a great addition to the out of the box functionality – thank you for publishing this!

    I noticed that the parent / child fields are limited to text columns.  Are there plans to extend this functionality to other column types (such as lookups)?  An example that comes to mind is the Team / Team Member relationship.  I was hoping to employ a lookup list with a text or lookup Team column type and a Team Member  which leverages the Person / Group column type.

    Is this possible or planned at some point?

  8. KristinSch says:

    Thank you for publishing the new release of this great feature!

    I noticed that you can choose a list, which exists in the website.

    Is it possible to enhance your feature? So that you can:  

                           (1) choose the website (Site)

                           (2) and then choose the list

    Could you imagine to realize the idea in the near future?

  9. ThomasWalz says:

    Hi, this is a GREAT enhancement for Sharepoint Sites. We will use it for displaying Projects with various Categories (such as Online, ERP) that have sub-Categories (such as Sharepoint…).

    The only two things which would be very helpful is the ability to choose the website (see the comment from KristinSch) and it dont seem working when the the connected lookup fields are defined as site columns within a website content type. this is (in my opinion) a must for middle and large deployments of sharepoint.

  10. leonidly says:

    sorry for the delay in response.

    Sofar the Text type limitation is due to the underlying CAML query, WHERE statement specifically.

    extend the source of the list seems to be doable and I plan to work on it. However, the default lookup is limited to the current site.

    I have not looked at the custom columns yet.

    It would be good to have a big source list with dif column types to work with. Please feel free to send me your sample and I’ll take it into the test.

  11. TonyQ says:

    Hi Leonid, Thanks for the great custom field. It helps a lot.

    I noticed a problem when playing around it. If I define a connected lookup field on a document library, then I choose "View Properties" on a document inside the document library, it shows up an error screen:

    List Does not exist.

    The page you selected contains a list that does not exist.  It may have been deleted by another user.

    Is this a bug or it is something I did not configure correctly? Thanks.

  12. leonidly says:

    Tony, I didn’t see that in my test, so this might depend on the list. Pleasse send me your doc library.

  13. wolfi says:

    Hey Leonid,

    thank you so much for this tool – very useful indeed. However, I have to confirm the problem TonyQ has described – the "connected lookup field" generally works just fine, but it somehow disturbs the "View Properties"-function of the document library which is using the connected lookup field. I do get the very same error message Tony describes (well, in German, as I am using the German WSS v3.0, but it is the very same message).

    I’d be happy to provide you with any support to check out this problem, but I just can’t figure out what you mean by "send my your doc library" – do you want TonyQ to send you his documents in that list? At my server, this happens to every single document in any library using connected lookup fields, even if it is only one small .txt file in a freshly created doc library. The lookup field is successfully populated by a tiny list containing "country" and "state" samples – I can send you a screenshot if you’d want me to. It is possible to correctly see the properties of the library item if you choose "Edit properties", it’s just "View properties" that refuses to work when using a connected lookup field!

    Anyway: thanks again and best regards from Vienna/Austria,

    Wolfgang

  14. brigjevi says:

    Hey Leonid

    Great tool!

    I created a Custom List with 2 columns. The default title column and a column named group that is a connected lookup field. I can populate the list, but when I try to "View Item" I got the same error as earlier mentioned in this thread. Edit Item function is ok.

    Brigt

  15. ElinKolloen says:

    Perfect, excactly what i was looking for but the dispay page for an item crashes.

    I’ve created a custom list that serves as my lookup list, and another custom list that has connectedlookupfield colums configured. All works fine until I click on an item to open the default display page, it crashes. I’ve copied the stack trace hope that can help:

    – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

    [COMException (0x81020026): List does not exist

    The page you selected contains a list that does not exist.  It may have been deleted by another user.]

      Microsoft.SharePoint.Library.SPRequestInternalClass.GetListsWithCallback(String bstrUrl, Guid foreignWebId, String bstrListInternalName, Int32 dwBaseType, Int32 dwBaseTypeAlt, Int32 dwServerTemplate, UInt32 dwGetListFlags, UInt32 dwListFilterFlags, Boolean bPrefetchMetaData, Boolean bSecurityTrimmed, Boolean bGetSecurityData, ISP2DSafeArrayWriter p2DWriter, Int32& plRecycleBinCount) +0

      Microsoft.SharePoint.Library.SPRequest.GetListsWithCallback(String bstrUrl, Guid foreignWebId, String bstrListInternalName, Int32 dwBaseType, Int32 dwBaseTypeAlt, Int32 dwServerTemplate, UInt32 dwGetListFlags, UInt32 dwListFilterFlags, Boolean bPrefetchMetaData, Boolean bSecurityTrimmed, Boolean bGetSecurityData, ISP2DSafeArrayWriter p2DWriter, Int32& plRecycleBinCount) +169

    [SPException: List does not exist

    The page you selected contains a list that does not exist.  It may have been deleted by another user.]

      Microsoft.SharePoint.Library.SPRequest.GetListsWithCallback(String bstrUrl, Guid foreignWebId, String bstrListInternalName, Int32 dwBaseType, Int32 dwBaseTypeAlt, Int32 dwServerTemplate, UInt32 dwGetListFlags, UInt32 dwListFilterFlags, Boolean bPrefetchMetaData, Boolean bSecurityTrimmed, Boolean bGetSecurityData, ISP2DSafeArrayWriter p2DWriter, Int32& plRecycleBinCount) +210

      Microsoft.SharePoint.SPListCollection.EnsureListsData(Guid webId, String strListName) +1436

      Microsoft.SharePoint.SPListCollection.EnsureListsData(String strListName) +78

      Microsoft.SharePoint.SPListCollection.ItemByInternalName(String strInternalName, Boolean bThrowException) +123

      Microsoft.SharePoint.SPListCollection.GetListById(Guid uniqueID, Boolean bThrowException) +77

      Microsoft.SharePoint.SPListCollection.get_Item(Guid uniqueID) +57

      MayaIntl.SharePoint.ApplicationPages.ConnectedLookupFieldControl.get_DataSource() +179

      MayaIntl.SharePoint.ApplicationPages.ConnectedLookupFieldControl.CreateChildControls() +216

      System.Web.UI.Control.EnsureChildControls() +87

      Microsoft.SharePoint.WebControls.BaseFieldControl.OnLoad(EventArgs e) +176

      MayaIntl.SharePoint.ApplicationPages.ConnectedLookupFieldControl.OnLoad(EventArgs e) +33

      System.Web.UI.Control.LoadRecursive() +47

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Control.LoadRecursive() +131

      System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

    – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

    Regards

    Elin Kolloen

  16. leonidly says:

    My tests are running fine for item View/Display. NOTE: The current version support lists <1,000 items. I suspect that there is something list specific, that causes COM exception above. Feel free to email me your lookup list to llyublin@hotmail.com and I’ll double test. Also I will need to see your web.config.

  17. Leonid,

    I can’t thank you enough for this solution. I’ve been looking for this for a year now. I saw your article before (v.1) but did not succeed in configuring it at the time. Tried the new version : YOU JUST MADE MY DAY !!!

    As for the DispForm.aspx error, I also have the same problem as ElinKolloen, brigjevi, TonyQ and wolfi.

    But…. I made a custom DispForm.aspx in Sharepoint Designer with a Custum List Form, this resolves the problem, I also tried the standard List Form but this causes the same problem as the default DispForm.aspx

    I hope this helps you solving the problem and in the meantime we can use the Custom List Form.

    They should convert this to an update for Wss and Moss straight away (and pay you bigtime for it 😉 since it should have been there OOTB. Keep it up.

    Marc

  18. leonidly says:

    Thanks to all, guys

    I just posted an updated version, that should (I hope) take care of the View/Display menu. If nothing else, it supposed to display an error message.

    This release is still valid for lists of less than 1,000 items

  19. a.brambilla.s says:

    Hi Leonid

    I’ve installed your new version of ConnectedLookupField.dll, but when i try to insert a new item o edit existing receive this error:

    Suspicion about the infinite loop in BuildHierarchy.

    Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator.

    Troubleshoot issues with Windows SharePoint Services.

    Can you hel me?

    Thanks in advace,

    Regards

    Alessio

  20. MikeChrisTalbot says:

    Hi Leonid

    Thanks alot for your field. It’s a big help and works great!!!

    Kind regards

    Mike

  21. brigjevi says:

    Hi

    I use this field in a list, and make a data sheet view on the list. The value of the field is in the 3;#SSM format instead of SSM. Why is this ?

    Because of this I also have trouble using the value of the field in Workflows.

    Is it possible to change this to display the right value

    SSM is an example of a value in a lookup field

    Best Regards

    Brigt Gjevik

  22. MikeChrisTalbot says:

    Hi Leonid

    would it be possible to add a feature, so that the parent and the child elements dont have to be in the same list? So that on could use a list for all countries and a list for all cities with a relation to the countries.

    Kind regards

    Mike

  23. Sean Chen says:

    Hi Leonid,

    Your tool is very helpful for me, I found 2 issues, could you take a look?

    1 you know a standard lookup field rendering in the view has a hyperlink linked to the related data in the source list, could you take a look to check whether your tool can implement this?

    2 if a connected lookup field points to a "calculated (calculation based on other columns)" in the source list, this field can NOT be set as Group By field in the view.

    Big Thanks and look forward to your reply!

  24. leonidly says:

    All, thanks for the feedback, questions and suggestions,

    Here are some answers:

    I removed the hyperlink because the Connected Lookup has one to many relationship for a parent. The field just pick the 1st one with given value. If you want, you can manually edit fldtypes_connectedlookup.xml and set AutoHyperLink="True"

    Calculated fields are not designed for due to lack of time. Same with multiple fields.

    The next update on my agenda is to allow source list to be in any site by given Url.

    The infinite loop exception fires when there is more than 200 nested levels. I never tested more than 5.

    I will be glad to look at the errors. For that please save your list as template and email me the .stp file to llyublin@hotmail.com

  25. Sean Chen says:

    Leonid, thanks for your rapid response!

  26. thetuy says:

    Leonid,

    i cannot install your file in Windows SharePoint Service 3.0 because it need SharePoint Server.

    How can i setup it?

    Thank.

  27. leonidly says:

    You might get by without MOSS server if you get microsoft.sharepoint.dll and microsoft.sharepoint.security.dll

  28. hzha034@hotmail.com says:

    Hi Leonid,

    Thanks for your great works!

    Have you try to set the connected lookup fields as required field? I got exception on that.

    In my situation, i have a country – city relationship. The ConnectedLooupField works perfect if both fields are set to optional.

    If Country Field (the parent field) is set to required, the City Field (the child field) don’t have any value except "(None)" when the first item of the Country Field is selected. It works fine when select reset of the items.

    If the City Field or both Field are set to required, there is exception occured as below

    [ArgumentOutOfRangeException: ‘Lookup’ has a SelectedValue which is invalid because it does not exist in the list of items.

    Parameter name: value]

      System.Web.UI.WebControls.ListControl.PerformDataBinding(IEnumerable dataSource) +1820407

      System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +104

      System.Web.UI.WebControls.ListControl.PerformSelect() +31

      System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70

      MayaIntl.SharePoint.ApplicationPages.ConnectedLookupFieldControl.UpdateBinding() +172

      MayaIntl.SharePoint.ApplicationPages.ConnectedLookupFieldControl.OnPreRender(EventArgs e) +56

      System.Web.UI.Control.PreRenderRecursiveInternal() +86

      System.Web.UI.Control.PreRenderRecursiveInternal() +170

    Do you have any idea of this?

    Thanks!

  29. leonidly says:

    Just posted v 3.0. The new version allows loading a source SP list from any SP site, not just current site. Not 100% tested 🙂 

  30. jhayess says:

    GREAT tool — the immediate problem I notice is that if any of the fields are set to required, the list throws an immediate, "Unknown error has occurred".  Any thoughts?

  31. leonidly says:

    Thanks to chri5 and jhayess for pointing out on this issue. The posted release should have fix for required fields. Not thoroughly tested tho.

  32. bhickman says:

    Hi Leonid,

    Your connected lookup field has helped me avoid custom development on several project – thanks for releasing it!

    I’m working on a scenario where I require 5 connected lookup fields in a document library, but I’m receiving the error "Cannot complete this action." when I try and upload a document or edit permissions. It seems like 4 connected lookup fields is a hard limit, becuase when I remove one column everything works fine.

    Is adding support for a 5th field a significant enhancement on your part?

  33. sjjoshi says:

    How to write and read datas from lookup multi data column?

    Does anybody know about this.

    If Yes can you tell how is this possible?

  34. caueabreu says:

    Hi Leonid,

    Thanks for your great tool! It’s very helpful!

    Man, I think that I found 1 issue, that can be easyly Bypassed…

    In my basic situation, I needed to use 2 ConnectedLookup Fields:

    FIRST     : Just Value

    SECOND : Value and Parent

    I noted that, when the FIRST field is a "Needed Field", the SECOND field never loads for the FIRST "first value".

    Its not a big deal… but i needed to report..

    Big Tnks !!

  35. Sean Chen says:

    Hi Leonid,

    I have the same issue as caueabreu,  and additional questions below:

    1 Is possible to specify "Choice" colunm in a list selected as the Value or Parent column?

    2 Is possible to specify "filter" for value column? for example: I have "Project Information" list and create a new list  below to look up :

      Fiscal Year is Choices column: 2008,2009,…  in "Project Information" List),

      Team        (Connected Lookup: Team 1, Team 2,… from "Project Information" List )

      Project   (Connected Lookup: Project 1, Project 2,… from "Project Information" List , its Parent column is set to "Team" )

      besides the "Team" filter, can I add another filter by Fiscal Year for Project column like "Select Project Where Fiscal Year = 2008"?

  36. Leonid,

    I’m still a very happy man with your solution (installed v3.1 recently).

    I only have one problem.

    When i create a custum list form (newform.aspx or editform.aspx) with sharepoint designer, the connected lookup fields show the correct choices when i fill in the custom form in the sharepoint interface.

    But…. no matter what choice i make, the selection doesn’t get saved when i save the form. When i open the saved item again the connected lookupfield are empty again.

    I haven’t made any changes to the custom list form (besides dropping it on the page and saving it in sharepoint designer)

    In the default newform and editform everything is working fine.

    Any ideas??

    If you want me to mail you anything please let me know.

  37. TonyQ says:

    I have the same problem as caueabreu for version 3.1

    also, I noticed that I can not change the parent column back to (none) once I changed it to something else.

    Thanks again for the great field

  38. iDuomo says:

    This solutions works great except the 1000 item limit.  I have a list of contacts (>1000) and I want to first select a client from the parent dropdown and then have the child dropdown get populated with all contacts belonging to the selected client.

    Is there any way I can increase the list size limitation?  Thanks for developing this fantastic addition to Sharepoint fields.

  39. leonidly says:

    marcvaneijk and TonyQ ,

    Please post the steps I can follow (hopefully w/o SPD) to replicate the problem you see.

    Thanks

  40. Leonid,

    I can only explain my issue with the help of SPD.

    1. Create a new site collection.

    2. Add a default tasks (or any other list) to the root site.

    3. Create a custom list (source for the connected lookup fileds).

    4. Add the connected lookup fields to the tasks list.

    5. Add a new task to the task list from the sharepoint interface (newform.aspx) and all goes well.

    Now for the custom newform.aspx

    1. In SPD : Open the site and go to the list (in this example : tasks).

    2. Rightclick the list and choose new > ASPX.

    3. Insert a custom list from (insert > sharepoint controls > custom list form) en choose the list tasks as the source and select newform as the type.

    4. Save the page as customnewform.aspx (or any other name)

    5. Rightclick on the list and select properties. Choose the tab supporting files. Click browse on the new item form and browse to the customnewform.aspx you just created. This wil use your custom form as the default for creating new items in the task list.

    6. Go to the Sharepoint interface open the tasks list and create a new item (in the url you can see that the customnewform is requested).

    7. Fill in the form. You can see that the connected lookupfield show the correct values and function properly.

    8. Select values for the connected lookup field and save the form. So Far So Good.

    9. Go the the list again and open the task you just created. All the information you entered are saved except for the connected lookupfields which are empty.

    I can recreate the same issue in a complete different environment.

    If you need any more explanation just let me know.

    Merry Christmas and a happy new year.

    Marc

  41. michaelwhill says:

    I am trying to use your solution in a WSS (SharePoint Services v3) implementation but the v3.1 installer requires MOSS 2007.  Do you have a version of the code that works with WSS?

    – mike

  42. dvanbruggen says:

    I am also trying to use this in a WSS3 site and it would be great if it could work with this version as thsi exactly what I am looking for.

  43. leonidly says:

    Change element <add key="Require" value="MOSS" /> in setup.exe.config. Full help on the installer can be found at http://www.codeplex.com/sharepointinstaller

  44. dvanbruggen says:

    Leonard,

    Thansk for the fix for the install. IT worked easily. I must be doing something incorrectly.

    I have a Client record lsit which has in it the name of a client and the record Id (automatically generated by Sharpeoint)

    In another list I want to have a drop down that displays the client name , but actually also records the record ID so that I can then "link" these lists later on to filter the second list( which is tasks) to show all the tasks related to aparticualr cleitn.

    I can not get the connected lookup fields to populate with any value?

    Cna you help?

  45. sebiuta says:

    HI Leonid ,

    I want to congratulate you for this extraordinary piece.

    I start using it , but i have some problems.

    I have 4 entities (4 lists) on 4 levels :

    Level 1 :Customer

            Level 2: Project

                     Level 3:Module

                              Level 4 : Issue

    Level 1 is a simple list.

    For level 2 list i use a standard lookup field (that point to Customer field)  and i create a workflow that copy Customer value in an text field . I saw that your type of field only connect to text fields.

    For level 3 i use 2 conected lookup fields that are bounded to Customer and Project , from Project list. I also create a workflow that copy Customer and Project values into other 2 text fields in order to be linked to the 4 level. The problem is that the value from Customer and Projects contain  foreign characters.

    Example : 4;#Brookline

    I believe that the 4;# is the identifier. How can i get rid of those caracters ? How can i copy only the value (Brookline) ?

    Thank you .

    Best Regards, Sebastian Soanca

  46. leonidly says:

    dvanbruggen

    to make field as a link you might modify XML in fldtypes_connectedlookup.xml. Try removing AutoHyperLink="FALSE" or set to TRUE

    Sebastian

    I don’t have an answer for you nor I’m able to reproduce this problem.

  47. robdarita@aol.com says:

    Great work, Leonid.

    Yet, I do not see all the fields of a custom list i created when I go across sites (another site collection) as the list source. I see all fields from a custom list in the current site, however.

    Why would this be?

    Thanks for your efforts.

  48. Igor Macori says:

    Una delle domande più ricorrenti che mi capita di ascoltare durante i corsi o le consulenze SharePoint

  49. mike@talbot.ch says:

    Hi Leonid

    Thanks alot for your effort around the connected lookup field.

    I’ve opened up an list with two field (country, state) to use as lookup fields. In the documentlibrary I use the two fields as you suggest above. After uploading I can set the properties and change them with no problems (so if I change the country I get the new states). If I then save the properties and try to edit them later and then change the country I get the following error

    ArgumentOutOfRangeException: ‘Lookup’ has a SelectedValue which is invalid because it does not exist in the list of items.

    Parameter name: value]

    ArgumentOutOfRangeException: Lookup besitzt ein SelectedValue, das ungültig ist, weil es nicht in der Elementliste vorhanden ist.

    Parametername: value]

      System.Web.UI.WebControls.ListControl.PerformDataBinding(IEnumerable dataSource) +1822067

      System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +104

      System.Web.UI.WebControls.ListControl.PerformSelect() +31

      System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70

      MayaIntl.SharePoint.ApplicationPages.ConnectedLookupFieldControl.UpdateBinding() +93

      MayaIntl.SharePoint.ApplicationPages.ConnectedLookupFieldControl.OnPreRender(EventArgs e) +55

      System.Web.UI.Control.PreRenderRecursiveInternal() +77

      System.Web.UI.Control.PreRenderRecursiveInternal() +161

      System.Web.UI.Control.PreRenderRecursiveInternal() +161

      System.Web.UI.Control.PreRenderRecursiveInternal() +161

      System.Web.UI.Control.PreRenderRecursiveInternal() +161

      System.Web.UI.Control.PreRenderRecursiveInternal() +161

      System.Web.UI.Control.PreRenderRecursiveInternal() +161

      System.Web.UI.Control.PreRenderRecursiveInternal() +161

      System.Web.UI.Control.PreRenderRecursiveInternal() +161

      System.Web.UI.Control.PreRenderRecursiveInternal() +161

      System.Web.UI.Control.PreRenderRecursiveInternal() +161

      System.Web.UI.Control.PreRenderRecursiveInternal() +161

      System.Web.UI.WebControls.WebParts.WebPart.PreRenderRecursiveInternal() +62

      System.Web.UI.Control.PreRenderRecursiveInternal() +161

      System.Web.UI.Control.PreRenderRecursiveInternal() +161

      System.Web.UI.Control.PreRenderRecursiveInternal() +161

      System.Web.UI.Control.PreRenderRecursiveInternal() +161

      System.Web.UI.Control.PreRenderRecursiveInternal() +161

      System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

    Can you help me on that? Kind regards Mike

  50. coneslager says:

    First of all, very nice.  Especially the installer!!!!!!

    Any progress on using a lookup field?  That would make this very CAML but you metioned something above about the where clause.  This may or may not be related, but I was looking thru one of the project templates in the fab 40 where they are showing related items on the project display form.  I looking closer at the sp datasource, they had changed the where clause a bit when the incoming parmeter is a lookup field instead of text.

    Text Parameter

    <View><Query><Where><Eq><FieldRef Name=’Project’ Type=’Text’ /><Value Type=’Text’>{0}</Value></Eq></Where></Query></View>

    Lookup Parameter

    <View><Query><Where><Eq><FieldRef Name=’Project’ Type=’Integer’ LookupId=’True’></FieldRef><Value Type=’Integer’>{0}</Value></Eq></Where></Query></View>

    This may not help this but maybe it can help others as they try to use IDs for filtering.

  51. coneslager says:

    I have a couple of questions for anyone using this control.  

    1.  It appears that once I select a parent field and can not change it back to none with deleting the column and losing the data.  Is this correct?

    2.  Can this list work across multiple list? I had my parent drop down coming from list one and the child drop down from list 2.  List 2 contained the key text field from list one but it does not work.  My solution was to use list 2 for both the parent and child drop downs but it limits the parent to only items that have related entries and not everything that is in list 1.

    TIA

  52. asjad.lakhani says:

    Hello Leonid,

    As per above blog conversations, someone has asked this:

    ===============

    i cannot install your file in Windows SharePoint Service 3.0 because it need SharePoint Server.

    How can i setup it?

    ===============

    And you replied this:

    ===============

    You might get by without MOSS server if you get microsoft.sharepoint.dll and microsoft.sharepoint.security.dll

    ===============

    I am having the same issue in my current application. I couldn’t get what to do in this issue. Can you please be more precise?

    Thanks in advance.

    Asjad Lakhani

  53. phanikirankoneru says:

    Hi Leonid,

      We found there is a problem with CAML generation in GetWhere() method. It is failing for nested connected lookup fields of order 3.

    Regards,

    Phani.

  54. saaf says:

    First of all, thanks for your big effort to build such control,

    secondly i have a problem :

    i create the parent column in the list

    when i create the child column, the parent column is not listed in the list of column available in the list

    how can i fix this problem ?

    thanks in advance for your response.

  55. rakeshchouhan says:

    from where do i download the intall.exe file for installing the connected lookup field.

  56. ju_jr says:

    Morning Leonidly,

    I try use the connected field and doesnt work.

    I configure 2 dropdowns (ddl parent (Country) e ddl chield (State) but nothing happen.

    The 3.1 version is a newer??

    Best regards,

    Junior

  57. michaelwhill says:

    Leonid,

    Thank you for your update.  I was able to install but I have a child list with >1000 records and was wondering if that limitation can be increased.  I am not entirely concerned with performance given the large number of records but was hoping you had a way to increase this limit.

    Thank you,

    – mike

  58. greone says:

    Hi Leonid,

    do you plan a further update that will allow multiple choices? You already embedded the option but it isnt implemented yet.

    Regards

  59. leonidly says:

    Folks, there are no updates expected in near future

  60. davidsatz says:

    Hi Leonid,

    This is a great field type that I can really use, but I am having the same problem as Saaf. I cannot select anything but the same field a normal lookup can select when I am setting up the child; so I cannot pick the child field.

    Help greatly appreciated!

    TIA,

    Dave

  61. remonboonstra@hotmail.com says:

    Hi Leonid,

    I tried a lot to get it to function as expected.

    Is there some kind of small manual around?

    I think I’m missing out on something.

    Thanks!

    Remon

  62. remonboonstra@hotmail.com says:

    Hi Leonid,

    I solved my puzzle.

    Solution to the problem Davidsatz and other people have.

    Biggest hint >> Everything must be in ONE list <<

    Small manual/example:

    You have the following lists:

    >Product Categories (columns: Title[text])

    >Products (colums: Title[Text], ProductCategory[Lookup], ProductCategory_Text[Text])

    With, Sharepoint Designer make a workflow, so that the value of the lookup is copied to the ProductCategory_Text field.

    >Articles (colums: Title[Text],ProdCat[Connected Lookup],Product[Connected Lookup])

    ProdCat:

    Get Information From: Products

    ParentColumn: (None)

    ValueColumn: ProductCategory_Text

    Broadcast: Selected

    Product:

    Get Information From: Products

    ParentColumn: ProductCategory_Text

    ValueColumn: Title

    Broadcast: NOT Selected

    This is the way that I set it up and it works!

    Leonid:

    One question: Is it correct that I can only have ONE set of "Connected Lookup Fields" ? I tried the above example and tried to add the same set (off course other Column names) to the article list. But only the first shows.

    Can you give me the awnser?

    Thanks,

    Remon

  63. shatch says:

    I have one list setup w/ a column for product name and a column for codename.  The part pulls in everything as I would expect and does what I needed it to except for one BIG issue.  If the items in the source list are changed or updated or changed and I go to any documents with that list data and try to edit it, I get an error.  Has anyone seen a similar problem and how it may be resolved?

    Thanks

  64. shatch says:

    Just as an update… what I have found is if the "Parent" field is changed in the source list, any documents w/ that assigned to it will not allow updates and crashes.  Is there away around this?

  65. leonidly says:

    Sorry, it’s been crazy lately. Catching up…

    1. The source by design should be in one list.

    2. The fields (columns) must be "text" type. There is underlying CAML query where data type is important.

    3. Changes in the parent field will most likely break connected lookup. In contrast to the regular lookup, connected one uses Value and not ID. If value changes…

    4.  There shouldn’t be limitation on use of multiple childs for the same parent in the same list. Limited testing was fine.

    5. I haven’t tested mutliple connected lookups w/ different sources in the same list. I don’t expect it work though.

  66. Simone78ita says:

    Hi Leonid,

    the feature work good when i add new document.

    but i have a problem when modify the property of item,

    when i change parent column i get an error.

    It is possibile to have a source code?

    thanks

  67. mecieu_mecieu says:

    I have tried to install this on my server and got a successful message but I don’t see the Connected Lookup Field option in my lists.

    Can anyone help me please?

    Thank,

    Kev

  68. jlesinski says:

    Hello,

    Could you possibly post the source or email it to me?

    Thanks,

    Jim

  69. amitkumarajain says:

    The attachement worked wonders for me 🙂 thanks for sharing this information.

  70. eitanb says:

    Hello.

    if you need more advanced features and support – you can look at Infowise Connected Fields component

    it supports – Content Types & Site columns support, Unlimited number of levels you can filter by and multi value support.

    http://www.infowise.co.il/Product_ConnectedFields_2007.aspx

    Eitan

    .

  71. anyone says:

    Hello,

    I would like to ask if is there is a way the code to work without Microsoft Office SharePoint Server 2007 (only with SharePoint Services 3.0 installed)?

    It will be great really.

    Kind Regards,

    anyone

  72. ignacio.c.carballal says:

    Hi,

    The connected lookup is really cool. Thank you for share this.

    In the other hand, i want to contribute with some bugs that i found on it:

    1) When i tried to use 2 connected lookup from the same source list, just one of the connected fields appeared. For example: i created 2 lists called Employees and Training and I loaded all employees in the Employees list. In the training list, i created 2 connected look up fields, one called Employee and the otherone called Manager, both pointing to the Employees list. After the fields creation, i tried to load a value to the Training list but i couldn’t see the Manager list, i saw just the Employee field correctly.

    2) When i set the Employee field as mandatory, i couldn’t get the linked values of the first employee.

    3) I could connect a lookup field to a choice field, how? I did the following: i created a list called Employees with 2 fields: one called EmployeeName and otherone called Category, both Single Line Text. After that, i created 2 connected lookup fields in another list pointing to the EmployeeName and Category field. Then, i changed the type of Category from Single Line Text to Choice. In fact i could use the connected lookup field without any problem but when i tried to see the ParentColumn and ValueColumn that i set when i created the connected lookup field i couldn’t see the Choice field in the ParentColumns options.

    I hope it help.

    If you want to share the source code, maybe i can help you to solve these issues.

    My e-mail is: nachito206@gmail.com

    Regards,

    Ignacio

  73. hello,

    I have implemented the Connected Lookup field with a three layer relationship (Grandfather – Father – Son).  Upon edit the Son field in the editform is set to the first item in the list alphabetically and if not corrected for save, the field is updated to that value.

    is there something I am doing incorrectly?

  74. sebiuta says:

    Hi Leonid ,

    I would like to congratulate you for the great job done with connected look up field component. It really made my life easy in many ways. I started to create an internal portal to manage our activity. The all concept was based on your component. I have 5 levels of lists connected in cascade:

    Customer

       Project

           Module

               IssueTracker

                   TimeTracker

    I used the component on each list starting from Project list.

    There for if you want to add an entry in IssueTracker , will have to select from drop down lists (connected components ) , a customer, a project, and  a module. For TimeTracker, i skip the module level and i let for selection , customer, project, and issuetracker.

    The problem i have is the 1000 item limitation. I get back from my honey moon (week moon) and i found warning messages in my timetracker list New items can’t be inserted in the list.  I tried to send you an email with list template, web config and screenshot but a received an mailbox unavailable (state 14) error.

    Is there a way to solve this ? Please light me to make this work, otherwise , i will have to reconstruct all from scratch and use another solution (if there is any).

    Thank you so much for helping me.

    Best regards,

    Sebastian Soanca

  75. leonidly says:

    Folks,

    I’m working to publish the solution and source on CodePlex. I will post announcement when it’s accomplished.

  76. Numero UNO: Mamy listę klientów, którzy pochodzą z różnych kraji i miast. Chcielibyśmy by miasto było

  77. leonidly says:

    JUST PUBLISHED ON CODEPLEX: http://www.codeplex.com/cl

  78. jagga says:

    Hi    LEONID LYUBLINSKI ,

    Excellent artcile it was very uselful,

    But here i have faced some problem,is possible please recity .

    I have 3 list 1.project 2.Modules 3.Project feature

    here projects will be stored in Projects list(Columns :Project Name)

    In the Module list the there are two columns(Module Name,Project name)Here Project name is LookUp filed

    its looks from Project List

    in Project Features List there are three columns(1.ProjectName 2.Module Name.3.Feature Name)Here Project Name and Module Name lookup fields

    Your connected lookup fileds working for only for one list not  for Nested lists means i am not  able  to get lookp filed while getting value files

    Here my requirement is Project features list should look fileds from two lists Projects and Modules

    Actually module list have already lookup filed as Project Name and Module name

    so i want to create connectable lookup filed from Those ProjectName and Module Name

    while i am creating custom column with datatype as Connectable LookUp Field i was not able to get that LookUp filed name(Project Name)

    so please help me me if you ahve any suggestions.

    Regards

    Jagadeeshv

  79. mahmood.moghimi says:

    Hi Leonid,

    Great tool! Thank you so much.

    Regards

    Mahmood

  80. aetcha says:

    Hi Leonid,

    I’m trying to gather column information from InfoPath but they’re not reachable. Is there a way I can tweak it?

    Thx,

    Al.

  81. Nicolas says:

    Hello,

    I have the following problem with the Connected Lookup. If I use lists like the one below, it works fine :

    Cat1 > Item1

    Cat1 > Item2

    Cat2 > Item3

    But if some sub-values are repeated (like "Item"), the control miss the value when editing the row :

    Cat1 > Item1

    Cat1 > Item2

    Cat2 > Item1

    Do you know why?

    Thanks for your answer.

  82. den rogy says:

    My current project requires ability to display choice column value via color or image associated with a choice

    But Sharepoint standard packaged misses that control

    I am looking for available solutions on market

    I came across

    http://sharepointfields.com

    Does anybody has experiece using it?

Skip to main content