Kategoriarkiv: lookup

SharePoint two way lookup field, strictly out of the box

Sometimes you forget that SharePoint can do things out of the box, and you immediately start to think about how to customize or buy third party products to solve issues.

I for example, wanted a two way lookup between two lists. In other words, if I added items from List A to a lookup of an item in List B, I would like to be able to see the relationship on items in both lists. When I got the advice to buy a third party product for this, I thought I’d just see if there were any other options, and of course there was!

By following the steps on this blog, all I needed to do was to edit the display form of List B, and insert the related list. To do this, just go to list settings -> Forms Web Parts -> Default Display Form.

formWebParts

You will be redirected to the display form in edit mode. Just click the web part zone and the insert tab will appear. Open it, click Related List and select the list in the drop down.

relatedList

This will add a list view web part to the form, which is pre-connected to the item opened in the display form. Next time you open up an item in the list, you will see the list view of the related items in the form. Of course you can do this on the new, and edit forms as well.

This approach doesn’t look very good however, and you won’t get the related items in a list view. But it’s cheap, and could suit customers who are very cost-aware (a nice way of saying cheap). And with a little JSLink magic you should be able to make it look a lot better with hardly any effort at all.