SharePoint Cascaded Lookup: Parent-child relationship, filtered lookup and cross-site Lookup
More and more Fortune 500 companies are deploying SharePoint and, of course, SharePoint has a knack in managing large amounts of data. However, when it comes to looking up data from a large number of lists, or a list with enormous items, it is quite painful to nail down the data you are looking for.
Let’s take a look at a scenario first. Let us assume we have two lookup fields:
- A list of countries where your customers are located
- A list of cities that belong to different countries.
If one chooses a country, a drop down list should present cities that belong to that country. As such we do not need to go through all the cities in the list. This feature is not available in SharePoint 2007 or 2010. How can we do this?
In this article, I am going to provide you two ways to narrow down you targets: JQuery and SharePoint Cascaded Lookup . I am sure you will find significant improvement to your SharePoint lookup.
The first way of doing this is through JQuery. As you may know, to apply such functionality, we do not need to touch the server side, only invoke JavaScript in the web page will do the trick.
The easiest way I know to do this is to piggyback on the jQuery library called SPCascadeDropdowns presented at Codeplex. For detailed information please refer to http://spservices.codeplex.com/
Below is the simple syntax:
$().SPServices.SPCascadeDropdowns({
relationshipWebURL: "",
relationshipList: "",
relationshipListParentColumn: "",
relationshipListChildColumn: "",
relationshipListSortColumn: "",
parentColumn: "",
childColumn: "",
CAMLQuery: "",
listName: $().SPServices.SPListNameFromUrl(),
promptText: "Choose {0}...",
simpleChild: false, // Added in v0.6.2
selectSingleOption: false, // Added in v0.6.2
completefunc: null,
debug: false
});
To solve our scenarios, what we need to do is to add lists into appropriate places.
Using this solution does require writing code, but all of these are front end and it not a heavy lifting for a decent developer.
The downside, though, is it requires configuration in order to be used. As aforementioned, if we do not need to deal with a large number of lists, this is a way to go. Otherwise, you need to use another solution: SharePoint Cascaded Lookup.
SharePoint Cascaded Lookup introduces cross site lookup and filtered lookup in addition to cascading field achieved with JQuery.
SharePoint Cascaded Lookup supports both SharePoint 2007 and 2010, and comes with 3 languages: English, German and Japanese.
Next let us take a look at these features one by one.
Cross site Lookup
SharePoint build-in functionality only allows users to lookup items within the same site. This limits the scope of lookup and may impose a major hurdle for bigger organizations.
SharePoint Cascaded Lookup enables users to lookup list items in other sites as long as they are in the same site collection. It expands SharePoint list data by referring lists in different sites and allows you to view them in columns in one list.
If you want to implement this function then you cannot do it simply with JavaScript at the frontend. And there is no easy way without going through lengthy code.
Filter Lookup by view
Given a large number of data, filter field values by other fields in the same list can improve lookup efficiency dramatically. SharePoint Cascaded Lookup taps into JavaScript to introduce filter function into your SharePoint Lookup fields. As you may find out, this functionality is based on parent child relationship, or they are doing the same thing. The only difference is their name.
Easy Convert between Different Lookup Types
SharePoint Cascaded Lookup, Cross site Lookup and default lookup types can be conveniently converted to suit your needs. SharePoint Cascaded Lookup introduces a link, and by clicking it you can easily convert the current lookup columns in the list into other lookup types.
We are reaching the end of this blog, if you interested in this product, then go to SharePoint Cascaded Lookup to download your 30-day free trial.