Sunday, November 18, 2007

Sharepoint 2007 Custom Field - Query Based Lookup

First off all, i would like to thank DataCog Guys to show newcomers (specifically in MOSS) like me that thing like this can be done in first place.
So this was my problem. i was into a sharepoint project that had requirements so funny that made me think twice as to why are these guys opting for sharepoint 07 in first place.Y cant they happily do it through a .net 2.0 custom web app.
Well, thats a different story all together.
In short, one of those funny requirements was to get highly filtered data in a dropdown based list column. The "out-of-the-box" Lookup column is a plain lookup thats simply gives all the values of a particular column of a particular List in your List(It does not even take care to display distinct values ... lol)
my requirements were way to much for this lookup guy to handle.Yes, we are talkin about full fledged query's here (like select [column] from [list] where [column1] = [value] and [column2] = [value] and [column3] <= [value]..... so on and on) We First thought that web parts are only bet in this case. When i found out this article of these Datacogs guys.(once again.. all hail DataCogs) However, even these guys are solving their own specific problem of cascading dropdowns. I feel, my requirement was far too generic then this and i m sure 100s and 1000s did faced it and are facing it still. My plans were, why not give people a full fledged query building interface wherin, they can put as many filtering criteria's as they wish..(like the one i pointed above) So this is what i came up with following the same idea of the that DataCogs article The Project is now moved to CodePlex
Sorry, i continued on his project and after every thing was done, i was too lazy to remove them. so just dont look at them, Unless, offcourse you are interested in cascading stuff.
By the way, the only beauty of his control is a simple 4 line method called
FindControlRecursive. Cool stuff!!!
Any ways, a Big Thanks to DHTML goodies guys for making my fancy balloon toolTip dream come true in this control
Hoping of a response for bugs or feature enhancement at
baig.adil@gmail.com

Tags: ,