.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Using a list from one site as the lookup (foreign key) on a list on another site

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :SharePoint

The scenario: The site "S1" in site collection "SC1" contains a list "L1". I want to use list "L" in a lookup column "L2.C" in a list "L2" in a site "S2" in another site collection "SC2." Both sites are within my company's internal network.

What's the easiest way to do this? Searches of both TechNet and the Internet failed to help.

View Complete Post

More Related Resource Links

Create Lookup Site Column based on External List (SharePoint 2010)


I've got an External List and I want to create a Site Column, which is Lookup to a column in my external list. If I tick any of the columns in 'Add a column to show each of these additional fields' and click OK i get the following error message:

[NullReferenceException: Object reference not set to an instance of an object.]
  Microsoft.SharePoint.SPBusinessDataField.IsInDefaultView() +58
  Microsoft.SharePoint.SPBusinessDataField.CreateSpFieldForBdcType(String bdcName, Boolean hidden, Boolean readOnly, Boolean idField, SPAddFieldOptions op) +809
  Microsoft.SharePoint.SPBusinessDataField.AddNeededSecondaryFields(String wssNames, String[] oldNames, String[] newNames, SPAddFieldOptions op) +315
  Microsoft.SharePoint.SPBusinessDataField.OnAdded(SPAddFieldOptions op) +240
  Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol) +759
  Microsoft.SharePoint.SPFieldCollection.Add(SPField field) +61
  Microsoft.SharePoint.ApplicationPages.FieldNewPage.Save() +513
  Microsoft.SharePoint.ApplicationPages.FieldNewPage.BtnOk_Click(Object sender, EventArgs e) +46
  System.Web.UI.WebControls.Button.OnClick(EventArgs e) +114
  System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +139

# string with cross site lookup field value of List in datasheet view in moss 2007

I am getting appended # code value with cross site lookup field value of List in datasheet view, and also i am getting this value while export to Spreadsheet. How to remove this value.....

# string with cross site lookup field value of List in datasheet view in moss 2007


I am getting appended # code value with cross site lookup field value of List in datasheet view. I dont want that hash coded value, i need actual value. Please provide me the solution.



Rajanikanth Rayala

Cross site lookup field value contains the parent list item id and the title field separated by ;# i

Actually we are using third party component for cross site lookup and facing the problem with cross site lookup field value. Its showing the correct value in default list view mode, but in "Edit in Datasheet" and "Export to Datasheet" view cross site lookup field value contains the parent list item id and the title field separated by ;#. I need the actual value in "Edit in Datasheet" and "Export to Datasheet" view as shown in default list value, i dont want that appended parent list item id and separated by ;#.

Is there any OutOfBox soluiton for this. Please suggest me for the same.


WSS 3.0 Cross Site-Collection List Lookup


Hi all

New to Sharepoint here, so apologies if the question is unclear.

We would like to store centralised reference data in a dedicated site-collection and allow it to be accessed from other site-collections using list lookups. Can anyone recommend a webpart that would allow us to do this? I've found lots of cross-site list webparts, but not for crossing SC boundaries. Is there an OOTB feature that we could extend to achieve the same thing?




If you have found this post helpful, please click the 'Vote as Helpful' link (the green triangle and number on the top-left).

If this post answers your question, click the 'Mark As Answered' link below. It helps others who experience the same issue in future to find the solution.

ListData.svc REST API can't navigate relationship to lookup list in parent site


I have created a list in the root web that contains common information used by multiple sites throughout the site collection.  I have also created a site column that is a lookup column which pulls from that list.  This way, I can add the site column to any list in any sub site in the site collection. 

I have a list in a sub site in the same site collection that I have added the root web site column to and, from the UI perspective, everything works great.  I can add a list item to the sub site list and select an item from the root web list for that column. 

However, if I generate a strongly typed data context and associated classes using a Visual Studio service reference to ListData.svc (or if I just play around with the REST XML in the browser), the class property which represents the lookup column in the sub site list only contains the ID of the lookup item, not a reference to an instance of the item. 

I understand that the experience getting list information from a different site is usually less than optimal but are there any workarounds to get a reference to that lookup list item via the REST API?

cross-site list lookup using sharepoint 2010


Hi All,

Just want to ask how can I cross-site list lookup using sharepoint 2010.

 I’ve created two Sites. TestSite1 that has a list called List1 and TestSite2 that has a list called List2. The problem is when I tried to create a lookup column in List2 so I could see the List column in TestSite1 I could not find it.

How can I do this using the OOTB SharePoint 2010?


Thank you in advance.

Blog Site Lookup Field Changed List Reference


We have a OOB blog site that was working fine until last week. Overnight, the Category lookup field in the Posts list began referencing the Category list from another blog on a different, unrelated sub site. I'll try to illustrate the structure below.

Top Site
	Site A
		Sub Site A-1
			Sub Site A-1-1 (Blog 1)
	Site B
		Sub Site B-1 (Blog 2)

The Posts list in Blog 1 has a lookup field for Category, which now references the Category list from Blog 2--it should reference the Category list from Blog 1.

I came up with a solution to save the site as a template, alter the reference GUID in the manifest.xml, and then re-launch the site. However, this is not a perfect solution because:

  • Upon re-launch of the blog site, all comments and posts lose the previous Created and Modified By information and instead point to my account because I loaded the site. The only way I can think to circumvent this issue would be to modify the list reference while the site is still live, but I'm not sure how to do that.
  • I still don't know how this problem happened and how to avoid it in the future.

I've been researching the problem for several days and I can't find any rhyme or reason for how it may have occurred. I was hoping the community might have some ideas for me

How to add custom list entries to mysite's calendar in Sharepoint 2007 site?


I would like to know below things

(1) How to create MySite for one specific member with other or administrator's access?

(2) Scenario : Administrator have created one SP2007 site. now Administrator have created one calendar (Sample calendar). Administrator have added some entries in calendar. now one user entered in portal site ansd view the calendar and he click on MySite menu. so this sample calendar entries should enter in that user's mysite calendar. How this can be achieved?

Thanks in advance.
Regards, Praful Udade

internal hyperlink is not showing in main web site hyperlink list

Hi, I am using sharepoint designer 2007. I move data from 32 bit to 64 bit architecture. some of the hyperlinkslinks are not showing in my website hyperlink list hence site is not working correctly. what should I do? How can I show internal hyperlink?  

User Alert Management for a specific list versus entire SharePoint site?

It seems that to be able to manage User Alerts, one must have Full Access to the entire SharePoint site - and then use => Site Settings > User Alerts. Ideally, I would like to be able to grant access to users to only be able to manage alerts for a specific list. Is this possible (without having to do any programming) and, if so, how? If such access is only available at the site level, I will simply create a Permission Level that allows one to only "Manage Alerts" Thanks in advance for any assistance. Dave

Read list of a sharepoint site

I have to read a list of a sharepoint site from a client who does not has sharepoint installed. The problem is that when I try to use the SPSite tell me http://Sharepoint/sites/Sitio2/default.aspx could not be found. Tks!!!

Help with creating graphs in a site page from figurative data in custom list

Guys Can anyone provide me with someone help please? I need to be able show a graphs/line format in a web part of a site page on my SP 2010 site. I want to use some changing figurative data that is contained within a custom list change a the line/pie chart graph on the fly that is located within a chart/line graph in a site page. Basically when the data in the custom list gets changed by my resources I want to be able to see the changes in the graph almost like a live dashboard. I would be very greatful for some help. Note: I am not a coder nore do I ever claim to be, but if I could get a step by step guide on how to achieve this then I would be very greatful. I have a good understanding of SP but I am not to the coder. I able to supply the list if necessary and if someone could provide me with the code/or if code is not necessary for this task then please can you advise how? Many Thanks Mike Gowlett PMP P2P (MCSE, MSP, Old School :-) 

How to add List item in search results for anonymous in a publishing site?

Hi all,   For now, results in Library (document set or not) are shown and the link is the binary file. This is ok. But for list, anonymous users can't view results. As logged in I see the items in the AllItems.aspx page. How could I allow this result to be viewed by anonymous users too?      Thank you,   Benoit Pironet

How to get the list of all Site Collections that a user has access to

Hi All, Whats the best way to get the list of all Site Collections that a user has access to, under a particular Web Application? I have about 20-30 site collectiosn under the same WebApplication, and iterating through all of them for checking if the user has permissions is a bit performance expensive. Is there any other way of doing it?  Manesh K

SOLUTION: Renaming the Title list column globally across the site collection

So, you screwed up like I did, and modified the Title display name of the Item base content type and it has renamed ows_Title across every list in your site collection? Here's how you fix it: //WARNING //If you have come this far, be aware that this tool is a blunt axe. With it, you can cause //all sorts of mayhem and chaos in your site collection. So, to use this, you must be desperate. //or possibly dumb. Apparently, I'm just as dumb as you, because I did it. This is why I wrote //this stupid thing, so stupid people like us can go right on being stupid. //Your choice of weapon in this battle amuses me. Shall we begin? using System; using System.Collections.Generic; using System.Text; using Microsoft.SharePoint;   namespace RenameField {     class Program     {         static void Main(string[] args)         {             if (args.Length < 3)             {                 Console.WriteLine("Usage: RenameField <url-to-sitecollection> <internal-field-name> <new-fieldtitle>");               &n

Cannot access parent site list from subsite in XSLt List View webpart in sharepoint designer 2010

Hi    We are using sharepoint 2010  for internet facing sites for our big client in healthcare domain .  I am using XSLT list view webpart in sharepoint designer 2010 for retrieving contents from sharepoint list & displaying it by using XSLT List view webpart in publishing sites. We are having lot of list in rootsite collection, If i am creating pages by using XSLt list view webpart in root site collection I can access the list,View and Display in Pages by XSLT List view webpart. Now the requirement is i have to access the list in roosite collection(parent site) from subsites.  In Sharepoint designer 2010, while i am inserting XSLT list view webpart, i could not find datasource to access the list that exist in rootsite collection(Parent site) from subsite. Below is the the code i am using for accessing the list& view from parent site & creating the pages in parent site by using xslt list view webpart,now i wants to access parent site list from subsite by using XSLT list view webpat in subsite pages.  Pls let me know what i have to change in the code level <WebPartPages:XsltListViewWebPart runat="server" Description="The list for the conditions details" ListDisplayName="" PartOrder="2" Default="FALSE" HelpLink="" AllowRemove="True" IsVisible="True" All
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend