This was a post on Discussions in microsoft.public.sharepoint.development_and_programming. This may not be the most complete solution, but you will not have to use custom web parts to implement. Ok so, we want three different columns we can filter on for a basic list web part that can only connect to one web part at a time... Well, as long as we only want one of the columns to search on at a time.... We can do a little slap and tickle(Beer Fest, good movie). So the solution here would be to use a forms web part to put a drop down on the page, then place three identical list web parts on the page and three text filter web parts. Set up the appropriate connections between each set of webparts. Write some javascript code to hide/show the appropriate web parts based on the dropdown selection, and there you have the ability to search on multiple columns from one list using the default sharepoint filtering capabilities.
So this script below should get you on your way. I developed formatList in order to place a tab type menu inside of a sharepoint page, but it should work for this application as well. Place this text inside of a form web part for the dropdown menu. You can minimize all the filtered web parts to start with. Good luck and god bless your journeys in the World of SharePoint!
<div onkeydown="BLOCKED SCRIPTif (event.keyCode == 13) _SFSUBMIT_">
<select name=searchType onChange="show(this.selectedValue)">
<option value='column1'>Column1</option>
<option value="column2">Column2</option>
<option value="column3">Column3</option>
<option value="column4">Column4</option>
</select>
</div>
<script>
function removeTitle(listName){
var tds = document.getElementsByTagName('td');
for(var j = 0; j < tds.length; j++){
if(tds[j].title.indexOf(listName) != -1){
var minimizedWebPart = tds[j].parentNode;
minimizedWebPart.style.display = "none";
break;
}
}
}
//Use this if publishing is enabled on this site, otherwise just check the hyperlinks for "exit edit mode" link.
var EditMode = false;
var publishingMenu = document.getElementById("ctl00_SPNavigation_ctl01_toggleContainerColorBar");
if(publishingMenu)
EditMode = true;
//if edit mode clear titles
if(EditMode == false){
removeTitle('WebPart1');
removeTitle('WebPart2');
removeTitle('WebPart3');
}
function show(webpartTitle){
formatList(webpartTitle, 300, true, true)
//script to hide other windows...
}
function formatList(listName, height, scrollable, display){
var tds = document.getElementsByTagName('td');
var webpartZone;
var webpartRow;
for(var j = 0; j < tds.length; j++){
if(tds[j].title.toLowerCase().indexOf(listName.toLowerCase()) != -1){
webpartZone = tds[j].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
webpartRow = webpartZone.parentNode.parentNode.parentNode;
}
}
if(webpartZone){
webpartRow.style.display = display;
var bodyDiv = webpartZone.children[1].children[0].children[0];
if(scrollable){
bodyDiv.style.height = height;
bodyDiv.style.overflow = "auto";
bodyDiv.style.display = display;
}
}
}
</script>