Archives / 2008 / February
  • Content Query Web Part Customization Overview

    Oskar asked me today if I could walk some folks on his team through what can be done with the CQWP out of the box with no code. So before I write that up tonight, I figured I'd quickly describe what I know how to do and what I don't. Unfortunately, the later list is larger and more formidable than the former.


  • MOSS Configuration Certification Study Links - 70-630

    I'm currently going through some study materials for the 70-630 exam. I think it's going to take a pretty long time before I am there because my foundational knowledge of this technology is still pretty slim. At any rate, I located a bunch of tech-net links describing Shared Service Providers and security. Here they are in no particular order. I intend to walk through each of these as I have time (hence the time to get the cert). If I have the time and patience and I find other links I'll pass them on as well.


  • New BI and SharePoint Blog

    Have you ever had one of those guys who you could ask any technology question to and he'd know the answer right off? Like he had just did this very same thing 20 minutes ago and could rattle off what it took to make it happen? That's Tad. And now he's blogging. Some of his friends have been on him to do this for a long time but I'm glad to say he's finally out here in space. I look forward to watching his content...



  • SQL Server Management Studio Double Vision

    Took a second to realize what the heck was going on here. I think that this was due to a number of tries at installing VS 2008 and some MS BI tools and then uninstalling VS 05 and then putting it back. Everything still works but the UI looks like something out of 1992...



  • Get a SharePoint List GUID from the Browser

    Super simple.

    Go to the list settings page. Right click on "Title, description and navigation" and copy the URL. Paste that into notepad and copy everything after "List=" in the string. That's your URL Encoded GUID for the list. All you need to do is decode it. I found this php page that does it for you so you don't have to whip up a quick program to do it. I'm sure there are zillions of others around.

    Or maybe there is a URL decoder somewhere in the MS stack that I'm not aware of. Anyone? Anyone?



  • Notes on Customizing the Content Query Web Part Without Code

    There are lots of articles on the net about doing this but there were some things that I found really problematic in my efforts to get an update out.

    My Business Problem

    My company uses Scrum (generally) for project management. Therefore, we have planned "Sprints" that break down into tasks. These sprints have start and end dates and a status value. There is a specific project that is quite large and will involve a number of sub-projects that will be managed individually. So, naturally, we set up sub-sites from the top level project portal (MOSS). Now, the PM needs to see a listing of sprints across all sub-projects (sub-sites' sprint lists). The requirement here is that the sprint lists need to all have the same column names but they do not have to be built from a site template, though that would help speed their creation.

    So in a portal page the PM wants to see each project with each sprint across all sub-sites. He wants to see sprint name, start date, end date, current status and an icon that corresponds to that status value.

    This solution involved importing a customized .webpart file and updating the ItemStyle.xsl file with a new template element.


    I'll do a longer blog if I have time of how I did the complete solution but for now, here are the things that I found that didn't show up on the other site's tutorials.

    1. In the ItemStyles.xsl file, the name and match values cannot include spaces.
    2. If you copy the Default template, make sure you modify the match="*" to be the name of the template. Otherwise, any testing stuff you put in will show up for every web part that uses the default template. Could suck big...
    3. Unlike HTML, the ItemStyles.xsl file is absolutely syntax-sensitive. I accidentally put in a duplicate element. Thud! I put in an HTML image tag with no "alt" tag. Splat!
    4. To format a date:
      • add this to the top of the ItemStyles.xsl - xmlns:ddwrt=""
      • Then this to the xsl variables - <xsl:variable name="StartDate"><xsl:value-of select="ddwrt:FormatDateTime(string(@Start_x0020_Date), 1033, 'M/d/yyyy')" /></xsl:variable>
      • Then this to render it: <div><xsl:value-of select="$StartDate"/></div>
    5. If you add HTML tags to your item template and it bombs, put it into an HTML file in VS 2008 and see if you get squigglies indicating a "standards" issues with the element. (e.g. img tags require an alt element)
    6. Divs seem to always take up an entire row even if their styles have hard widths set. Try nesting spans in divs and setting the styles there. Not sure how this will fly with FireFox but it works in IE. Nobody uses FF anyway, right ;)
    7. Find the style templates by going to the portal page --> View All Site Content --> Style Library -- XSL Style Sheets
    8. In the .webpart file, if you use the ListOverride property, the lists indicated by the GUID's appear to be available across the site collection no matter where you place the webpart in that collection.
      • I imported my web part into a sub-site and it saw all the lists from sites that were at the same web-level as that site. So it looks like it was looking from the site-collection down no matter where in the collection you place the web part. Not sure if this is exactly true but its what worked on my MOSS VPC. Caveat emptor..
    9. In the .webpart file, using the CommonViewFields property, don't put any spaces anywhere in the property value.
    10. In the .webpart file, using the CommonViewFields property, use this link to see what the SPFieldTypes available are. If you don't put the correct field type string, it will not work and it will not error out.
    11. When you're constantly importing and re-importing the .webpart file, try appending an integer to the title. This will tell you if your update worked and when you get back from lunch you'll remember whether or not you actually deployed the last changes.
    12. For all files that you work with, before you edit them, MAKE A COPY!!!

    Hope this helps a bit...

    This is what my finished web part looks like in test: 




  • Two New Tools for SharePoint Development

    Some colleagues have recently turned me on to two new tools for SharePoint development. Both fit perfectly my personal analogy of what software should be. For me, its a tool that gets the job done. The better the tool, the less you notice it. Think journeyman carpenter with expensive hammer. He just gets the job done better and faster and doesn't spend a lot of time admiring his tool. ;)

    Both of these tools are open source which is also nice.


    The first tool is STSDev, a console utility that will create SharePoint projects for you with all the various xml files, GUID's and settings already set up. You can just start coding. Two nice things about it are that it does not integrate with VS as a project template so you can use it for VS 05 or VS 08 and target .Net 2.0, 3.0 or 3.5 and there are very brief videos on the codeplex site that walk you though the basics of making it work. This was written by a short stack of SharePoint MVP's and it shows. The output of the app is pretty comprehensive. Custom build targets allow you to build to whatever deployment scenario you need and, if you're not accustomed to stsadm commands, you can echo the commands executed to the output window and copy them off to a batch file for use elsewhere.

    SharePoint Manager (SPM)

    Need to know the CAML for a list? Need to know where the heck that list acutally exists in the server topology? What's the static name for a column and why can't I reference it? The SPM gives you a very simple, very fast tree view of the entire server and all of its content. I have hit a few "object not set to an instance of an object" error messages but for the speed and power that you get, its worth the annoyance.