Creating a cross site lookup field without code

There’s a high demand for using cross site lookup fields. Most solutions offered include deploying a solution or writing your own code. There is, however, a simple method for creating a cross site lookup field by using SharePoint’s own GUI.

In the following example I use 2 sites, http://sharepoint/Site with a custom list named “Values”. I added 3 items in the list as sample data:

main site

The other site is a subsite from the previous one, http://sharepoint/Site/Subsite. Here I added a custom list named “Using Lookup”:

sub site

Browse back to the main site, in my example http://sharepoint/Site, and click on Site Actions, Site Settings:

Site Actions Site Settings

On the site settings page navigate to the site columns gallery:

Site columns gallery

Click on the create button to create a new site column:

create new site column

Fill in a desired name:

site lookup column

Next, select the custom list “Values” at the properties and whatever you need to lookup:

site lookup column properties

Click on OK and navigate to your subsite’s custom list, in my example the list “Using Lookup”. Open up the list settings:

using lookup list settings

At the columns settings, click on “Add from existing site columns”:

list settings columns

Select the “Lookup Values” column and press the add button:

add lookup values column

Click OK, navigate to the list “Using Lookup” and add a new item. The lookup values from the topsite are now selectable!

new lookup item

As far as constraints go, they’re the same as every custom site column.

About these ads

23 thoughts on “Creating a cross site lookup field without code

  1. Ian Ching

    Nice solution. I have a similar problem but the issue is both lists are on different sites under the same site collection. For example my lists are in http://sharepoint/site1 and http://sharepoint/site2

    I want my list in site2 to lookup the list in site1. So far I’ve tried your technique and it doesnt work. I suspect its because the source list is not the parent site of the target list.

    Any ideas to overcome this??

    Thanks!

    Reply
    1. Bram Nuyts Post author

      Ian,

      You can easily resolve this, by using a site column. The following steps I found on the following blog describe the solution:

      To create a cross-site lookup field do the following:

      • Create the list that you want to be the source of your lookup field – must be deone at the site collection root.
      • Create a new Site Column (at the site collection root as well ) which you define as a lookup field and the liste created above as your source
      • Use the new site column field in your new list – anywhere in the site collection
      Reply
  2. mike

    I like your solution. I executed it, but for some reason, on my sub-site list, values aren’t coming in. The column is there, it says it’s a lookup column and points correctly to my main-site list, and my main-site list has values, but they’re not being displayed in the sub-site list. Any ideas?

    Reply
    1. Bram Nuyts Post author

      Mike,
      Are you able to see the lookup values when you create a new item? Or are you expecting the values to show up immediately on your subsite after you create an item on the mainsite?

      Reply
      1. mike

        I am expecting the values to show up on my sub-site after I create them on the main-site.

      2. Bram Nuyts Post author

        I don’t think that’s included in the design of a lookup column. A lookup field typically copies information from an existing item, to another item when the last one is created. You won’t be able to automatically create new items in your subsite by creating items in your mainsite, unless you write an eventreceiver. Or am I understanding the issue wrong?

  3. mike

    no, you’ve got it right. I guess I can’t do what I was hoping to do. At least not with site columns.

    Reply
  4. Lisa

    The only problem with this is that the logical site architecture suffers. Every list you want to perform a lookup on should NOT have to be located at the root.

    Reply
    1. Bram Nuyts Post author

      Lisa, you can place your list wherever you want in the site collection. You just need to create your site column at the site collection root.

      Reply
  5. MattW

    This solution works great, I hope in SP2013 they make this a more standard option. In 2007 we used sharepointboost cross site lookup, it works great, however when we migrated to Office365 is when we got stuck. no support for that type of solution in sandbox environment.

    Reply
  6. Elvis

    To dig out Lisas question, how can I create a site column in the site collection that points to a list in a subsite? The only lists I get offered as a lookup source are the ones on site collection level.

    Reply
    1. Bram Nuyts Post author

      This is a constraint of the site column “type” and is the same for a site content type. You can only work from parent to child. Not in the other direction. However, this doesn’t mean that your site column has to be at the site collection root. You just have to follow the parent – child relationship. For instance a lookup column on a subsite will work inside a subsubsite.

      Reply
  7. Willem

    Great, that is a clear description!

    I don’t seem to be able to select just any column from the source list when creating my Site column.
    Yes/no columns and dropdown (multiple selection) columns seem to be excluded.
    Is this expected behaviour?

    best regards,

    Willem

    Reply
  8. vijay

    what if the case we wanted to fetch the data of subsite to parent site any solution suggested out of box ?

    Reply
  9. William

    This will only work down your URL not up. You can not create a column on a subsite and then go to the parent site and implement it as it will not be available. However, if you create it on the parent site it will be available to all subsites.

    Reply
  10. damii

    http://www.azu.mn/?p=239

    The SharePoint Lookup Plus Field type is a “super” lookup field type that brings added capabilities that implementers found lacking in out of the box SharePoint 2013 Lookup fields:

    Cascading fields (“master-details”)
    Cross-site lookups
    Filtered lookups (filter lookup by views & CAML)

    check it

    Reply
  11. Rui Alves

    WIN WIN Solution of cross site lookups! mainly because I need to create columns in content type by XML and with custom lookupfield I couldnt! Now only using out of the box lookupfield.

    Many Thanks, Keep bringing this clean and easy solutions :)

    Reply
  12. Kimberly Mardossian Killian

    Is there any way to see the values from the lookup in subsites in 2013? I have a list called department which contains 5 columns on my root site, I want to use it on a subsite inside another list on the New/Edit/View forms as a lookup and save the values selected in my subsite list. So basically like a standard database look up. But when I create the site column and place it on my subsite list form, the field is added but the values are empty. Anyone know how to get around this. I want my root site to house several shared lists so I don’t have to maintain data in numerous places.

    Reply

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s