Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We are testing SharePoint 2010 Standard and have a need to have relational data, but be able to view the data from both sides of the relation.

For example, I have a contacts list and I create a list for company and within the the contacts list use a lookup column using the company list. Is it then possible to click on the company name and be taken to a view/list that shows all contacts that are a part of that company?

I have created my list as described above but when I click the company link all that happens is I am taken to a window which allows me to edit the value of the company name and view specific record details (create time, who created, last modify).

If there are 3rd party add-ons required to achieve this, or tutorials on how I can create this (keeping in mind my skill level for SharePoint development is beginner). We just need to be able to demonstrate a proof of concept and dont need anything fancy, just need to have the budget and project approved then if needed we can spend the money on proper development.

Thanks,

Matt

share|improve this question
add comment

4 Answers 4

up vote 3 down vote accepted

If you're on SP2010 there is an easier way to achieve this. Go to your companies-list and click on "Edit Form Web Parts" in the ribbon. There choose the display form and you will be directed to the default display form of this list. If a relationship via a lookup column is defined, you can see your contacts-list under "Page Tools -> Insert -> Related list". This will add a web part to your display form that that shows the related items, in your case the contacts related to a company.

What i noticed is that in this case SP resets the list settings to not use modal dialogs, you might need to re-apply this setting to your list.

I also found a detailed description with screenshots: http://blogs.sharepoint911.com/blogs/jennifer/Lists/Posts/Post.aspx?ID=95

share|improve this answer
    
+1 I see several replies with workarounds, while the OOTB related items feature does the job. –  Christophe Nov 10 '11 at 21:38
    
Great thanks for the info. –  Lima Nov 12 '11 at 4:09
    
Note that there MUST be a listformwebpart on the page for the 'related list' option to be available (otherwise it will be greyed out). If you have created a new page for the list item in designer, it will be using a dataformwebpart instead. What you can do here is add an additional listformwebpart to the page and then simply hide it. Use designer to add another listformwebpart for the same list ('insert' -> 'SharePoint' -> 'Listform'), save the page, then visit the page in the webbrowser and set the webpart's hidden option to true. Now, the related lists option will be available. –  tyshock Oct 19 '12 at 18:39
add comment

it's possible with standard web part that displays a view of list, using sharepoint designer you can configure it to get parameter from query string, and filter contacts list using company id.

Please take a look to series of posts by Laura Rogers about the related lists - http://www.sharepoint911.com/blogs/laura/Lists/Posts/Post.aspx?List=676af157-7d96-4e15-a987-54b8a3e4d948&ID=81

  • Query String URLs are like, SO Useful! (Part 1 of 4)
  • Query String URLs are Magical (Part 2 of 4)
  • The Query String URL & Data View Web Parts (Part 3 of 4)
  • SharePoint 2010 Related Lists (Part 4 of 4)
share|improve this answer
add comment

You can use JOINS(Left Join or Inner Join) in a CAML query to achieve the desired result. To see an example, You can check "List Joins" section in the post here : http://extreme-sharepoint.com/2011/10/19/rdbms-features-sharepoint-2010/

share|improve this answer
add comment

I can't think of a way to do this using only default functionality. However, the basic functionality would be reasonably easy to achieve by creating a custom Application Page in Visual Studio and then use the code-behind to populate an HTML list with the contacts you want based on an argument passed in the URL.

You could then create a List Workflow (or event handler) connected to the company list which adds the properly formatted URL to a Hyperlink column in the contacts list named something appropriate (like for instance "Associated Contacts").

This approach does require some knowledge of C# and the SharePoint .NET API, however. But as coding goes it's pretty straightforward.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.