Click here to Skip to main content
14,361,340 members

Displaying a SharePoint List from another team site in Sharepoint Foundation 2010

Rate this:
4.67 (6 votes)
Please Sign up or sign in to vote.
4.67 (6 votes)
17 Jul 2010CPOL
I remember I was using MOSS before and this is possible by using by connecting to another library like how it was disucssed in this blog, but now I had changed jobs and I am implementing the free version first whi

I remember I was using MOSS before and this is possible by using by connecting to another library like how it was disucssed in this blog, but now I had changed jobs and I am implementing the free version first which is the Sharepoint Foundation 2010 which have lesser functionalities than MOSS and one of it is displaying a SharePoint List from another team site.

The Sharepoint Foundation is locked down to display list data sources from the same team site but thanks to the Sharepoint webservices there is a way of doing it.

By default sharepoint have a suite of webservices available and these are the ones that are available

  • http://ServerName:99999/_vti_adm/Admin.asmx – used for creating and deleting sites, change 99999 with your administrative port number
  • http://ServerName/_vti_bin/Alerts.asmx – used for working with alerts
  • http://ServerName/_vti_bin/DspSts.asmx – used for retrieving schemas and data
  • http://ServerName/_vti_bin/DWS.asmx – used for working with Document Workspaces
  • http://ServerName/_vti_bin/Forms.asmx – used for working with user interface forms
  • http://ServerName/_vti_bin/Imaging.asmx – used for working with picture libraries
  • http://ServerName/_vti_bin/Lists.asmx – used for working with lists
  • http://ServerName/_vti_bin/Meetings.asmx – used for working with Meeting Workspaces
  • http://ServerName/_vti_bin/Permissions.asmx – used for working with SharePoint Services security
  • http://ServerName/_vti_bin/SiteData.asmx – used by Windows SharePoint Portal ServerName
  • http://ServerName/_vti_bin/Sites.asmx – used to retrieve site templates
  • http://ServerName/_vti_bin/UserGroup.asmx – used for working with users and groups
  • http://ServerName/_vti_bin/versions.asmx – used for working with file versions
  • http://ServerName/_vti_bin/Views.asmx – used for working with views of lists
  • http://ServerName/_vti_bin/WebPartPages.asmx – used for working with Web Parts
  • http://ServerName/_vti_bin/Webs.asmx – used for working with sites and subsites

Now what we need here for this sample is the http://ServerName/_vti_bin/Lists.asmx.

Also in my sample I had created a filtered list so that anything that is ticked “publish to root” will be the only ones displayed on the list you want to compile.

Image 1

This is a good way of separating your team site with the public site access, thus making the management of your announcements in one location and preventing giving access to users on your team site.

Note:  Thats is not a built in column and you have to manually create it.

Now from there you can now create your filtered list, here is the step by step process.

1. Go to List Settings

Image 2

2. Go to the bottom of the page and click on create view

Image 3

3. Choose standard view

Image 4

4. Filter it according to the “publish to root” flag

Image 5

5. Now your view is ready, click on it to view its List and View ID.

Image 6

Take note of this and replace the characters “%2D” with “-”  so on this sample the List ID which is shown as 58a8179c%2Da062%2D4dec%2D9569%2D4f0d5518ebf8 will be 58a8179c-a062-4dec-9569-4f0d5518ebf8 and do that as well for the View ID.  Take note of this as you will be using this ID’s later

Image 7

Now your everything is set up interms of your list data source, you need to now create your data source on Sharepoint Designer.  Fire up Sharepoint Designer and connect to your team site.

Now go to Data Sources and click SOAP Service Connection, then you can now define your Data Source.

Image 8

Service location : /_vti_bin/Lists.asmx
Data Command : Select
Port : ListsSoap
Operation : GetListItems
Parameters : You need to fill up only listname and viewname and this is the one you had taken note a while ago.

Image 9

Image 10
Now go to General tab and give it a Name

Image 11

And define Security Context on the Login Tab. Note: This is important as they security user that you will assign here should have access to the specific list thats why we havent used the Windows Authentication as it defeats the purpose of the one I discussed above (the two level announcement publishing) or you dont want to manage each users access to have view on specific List View.

Image 12

Image 13

Now go to any page you want to place your data view by clicking data view and choose your created SOAP Services Data Source.

Image 14

Now the list will now show on the page but you still have to clean it up as it will be in its raw form, like title will have “ows_” prefix on it, the Body is formatted to text (you can format it to rich text like the one below), the author have some extra characters that you need to clean as well (you can do it by modifying the field to <xsl:value-of select=”substring-after(@ows_Author, ‘#’)” />, so it removes that extra characters).

Image 15
Now you have it!

Another trick that I can share is that you can also merge different list you want to publish for example from multiple private team sites into the root sharepoint site by using the linked data source and choose any list you want to merge and join together into one data source.

Image 16

Image 17 Image 18 Image 19 Image 20 Image 21 Image 22


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Raymund Macaalay
Technical Lead
New Zealand New Zealand

Comments and Discussions

Questionproblem with get data on page Pin
Member 405964813-Oct-14 1:31
memberMember 405964813-Oct-14 1:31 
AnswerRe: problem with get data on page Pin
Member 405964813-Oct-14 2:03
memberMember 405964813-Oct-14 2:03 
GeneralRe: problem with get data on page Pin
Member 405964813-Oct-14 4:16
memberMember 405964813-Oct-14 4:16 
QuestionQuery data from the other site Pin
Member 1091310529-Jun-14 18:19
memberMember 1091310529-Jun-14 18:19 
whoajack31-Dec-12 5:27
memberwhoajack31-Dec-12 5:27 
QuestionData form not appaire Pin
Member 437191525-May-12 5:19
memberMember 437191525-May-12 5:19 
QuestionTrying to view data that is on a subsite Pin
michellekorb10-Feb-12 14:04
membermichellekorb10-Feb-12 14:04 
QuestionData View Format Pin
svaa27-Jan-12 5:11
membersvaa27-Jan-12 5:11 
AnswerRe: Data View Format Pin
svaa27-Jan-12 6:06
membersvaa27-Jan-12 6:06 
QuestionLogin Pin
svaa26-Jan-12 8:41
membersvaa26-Jan-12 8:41 
AnswerRe: Login Pin
Raymund Macaalay26-Jan-12 9:24
memberRaymund Macaalay26-Jan-12 9:24 
GeneralRe: Login Pin
svaa27-Jan-12 5:10
membersvaa27-Jan-12 5:10 
GeneralMy vote of 5 Pin
TheLawz18-Jan-12 8:00
memberTheLawz18-Jan-12 8:00 
QuestionDisplay User Picture Pin
Bruno Okamoto23-Nov-11 3:13
memberBruno Okamoto23-Nov-11 3:13 
AnswerRe: Display User Picture Pin
Raymund Macaalay23-Nov-11 9:47
memberRaymund Macaalay23-Nov-11 9:47 
QuestionDisplay a Survey and insert answers Pin
Bruno Okamoto27-Oct-11 8:01
memberBruno Okamoto27-Oct-11 8:01 
AnswerRe: Display a Survey and insert answers Pin
Bruno Okamoto27-Oct-11 8:02
memberBruno Okamoto27-Oct-11 8:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Technical Blog
Posted 12 Jul 2010

Tagged as


7 bookmarked