My contribution to Google Earth
Labels: big chicken, too big to fail
Labels: big chicken, too big to fail
I needed to connect two Web Parts in SharePoint to show the relationship between a list of physical servers and the logical instances on them. Connecting the Web Parts is easy, but SharePoint displays the parent list with radio buttons. All items in the parent list are always displayed, and you filter the child list by clicking the radio button beside the parent item you want. That's fine for a few items, but if you have more than a few parent items (physical servers in my case), then it just doesn't look very good.
What I want to do is put the parent list into a nice, neat drop-down box, but SharePoint doesn't do that out of the box. It took a few days but I figured out how to do it. Here's the end result:
Now when I select a server from the drop down, it refreshes the page and populates the physical server detail (right below the drop down) and the logical server instances list (on the right).
You can't do this through the browser. I used SharePoint Designer to insert Data View Web Parts, basically following the instructions in this video (update: the original video is gone so I've found another one that gives similar instructions) as a starting point. That got my data elements on the page and connected, but the physical server selector is still a list of all the rows. At least it's not radio-buttons anymore, but I want that dropdown box.
To change the server list into a drop down I followed these steps in SharePoint Designer:
Now you've got a drop down box. Save the page and open it in a browser. You'll see that the drop down is populated with the list of servers but there's a problem. Selecting a server doesn't do anything. The page doesn't refresh, and the other lists aren't filtered.
To get the drop down to work, I found this page on Microsoft support that describes the code change required. The article says it's for FrontPage 2003, but the solution worked for me using SharePoint Designer for SharePoint 2007 (MOSS, WSS 3).
So it works now, but there is one drawback to this approach. After you make your selection and the page refreshes, the drop down reverts to its default ("Choose One..." is on mine). I haven't figured out a way to have it display the current record after selecting. If anyone finds out, please let me know.
A lot of times this isn't a big deal because the block may not be that long (so there's not much room for error in the street number anyway) or the place you're going to is large and easy to spot. But frequently (and usually when you're running late), the address won't be where the program thinks it should be. I find this a lot for businesses in strip malls, shopping complexes, or office parks. My own office is a good quarter of a mile from where all the mapping sites place its address.Labels: Google Maps
The next day, the team started using the list. About 30 minutes into it, a user sent me an email saying that the text she was entering into the Comment field seemed to be disappearing. Uh oh. I quickly jumped into the list, assigned a few rows to myself, and started playing around with values to see if I could get the comment to disappear. I entered data into the row (in Datasheet view), and arrowed down to the next row to save. No disappearing text. I went back to one of the status fields on that row and changed a value from Y to N, then arrowed down to the next row. Poof - the text in the Comment field disappeared. WTF?Labels: SharePoint