Figuring out a alternative to Cross-Site Lookups

In my Twitter feed I posted some tweets on building a workaround to create cross-site lookups. I’ve got some replies of people -thanks!- mentioning alternatives like the one of Tony Bierman (in the Netherlands that would be a name to be proud of!), found on his blog: http://tonybierman.blogspot.com/2008/07/free-custom-cross-site-lookup-column.html

Now this is a valid approach for sure, but in my opinion it has one flaw; it uses a custom field type. I’ve had some bad experiences using custom field types, and that’s because they are terribly limited. You can’t use them in Infopath, in workflows, in the Document Information Panel, in Excel; well, just about anywhere outside the browser (that is, when you use more complex types. If you stick to a plain text field storing only text your safe, but hey, why not use a text field instead?).

I’m trying to build something that is less intrusive, something that is based on the standards of the whole SharePoint platform. My solution would be to create one central site with all kinds of “Fact” lists, these are the lists you would like to reuse and share within the SharePoint environment. In the background I create a SPTimerJob which is going to copy and synchronize all these lists to all the site collections. By creating a real instance of those lists in all site-collections, you can treat it like a regular lookup field. And lookup’s are a basic element in the platform. It even allows you to create a multi-value lookup, although that is a bit less accepted by older clients like Excel 2003.

The solution is not complicated, this is a schematic overview:

 

image

 

Of course you want to add some control to manage the TimerJob, for example I add a feature to each Site Collection to include or exclude it from the sync. The sync itself has to be a bit clever, so it has to recognize the copied item so it can do an update if the original has changed. We don’t want to be cruel and truncate the whole list each time because this could potentially break links and lookups.

That said, what do you think of this approach – is it feasible? I’ll post back my results;

Leave a Reply