A scenario came across this week where we needed to display a cross-site lookup column in our document libraries. A number of document libraries in different sites of a single site collection should have lookup columns so that items of document libraries could be linked to each other. This feature is not supported by SharePoint’s lookup column. You can bind data which are already stored in the same SharePoint site.
Cross-site lookup column is possible to implement custom field types for document libraries. There are very useful sources and code examples on this subject.
- Creating Custom SharePoint 2010 Field Types (MSDN Article by Ted Pattison): http://msdn.microsoft.com/en-us/library/gg132914.aspx
- Developing a SharePoint custom field type (SharePoint Magazine article by Karine Bosch): http://sharepointmagazine.net/uncategorized/developing-a-sharepoint-custom-field-type-for-displaying-crm-40-data
SharePoint Filtered Lookup Field
There is a CodePlex project called SharePoint filtered lookup field that offers new functionalities to default SharePoint lookup field by allowing filters to be applied to retrieved data.
Some of the features offered by Filtered Lookup field over standard SharePoint Lookup field:
- Cross-site lookup (all sites within same site collection)
- Filter retrieved data using list views
- Filter retrieved data using dynamic/ad-hoc CAML queries. This means you don’t need to create a list view each time you want to apply a lookup filter to source data
- Supports retrieving data recursively using either list views or dynamic queries
- Supports MultiLookup with filtered data
- Same look and feel as default SharePoint Lookup and MultiLookup (i.e. in list forms)
Some screenshots of Filtered Lookup Field from project’s CodePlex page:
I’d like to thank all of the contributors of this project. http://filteredlookup.codeplex.com/