<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Adventures in Consulting</title><subtitle type="html">This is a place for me to share those little gems one finds when doing consulting work.  Since I focus on Windows SharePoint Services 2007 (WSS) and Microsoft Office SharePoint Server 2007 (MOSS), most of the posts will cover topics relating to those products.</subtitle><id>http://blogs.msdn.com/valdon/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/valdon/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/valdon/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2008-04-24T21:43:00Z</updated><entry><title>FF at the End of a Content Type ID Kills Update Propagation</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/valdon/archive/2009/12/04/ff-at-the-end-of-a-content-type-id-kills-update-propagation.aspx" /><id>http://blogs.msdn.com/valdon/archive/2009/12/04/ff-at-the-end-of-a-content-type-id-kills-update-propagation.aspx</id><published>2009-12-05T00:25:14Z</published><updated>2009-12-05T00:25:14Z</updated><content type="html">I just spent a couple of hours tracking down an issue where our content type update code wasn’t working for some content types.&amp;#160; The problem ended up being that one content type in the hierarchy had a content type ID that ended with “FF” (such as “0x0100EBE43BB291D8438f94E2C48C129366FF”).&amp;#160; None of this type’s child content types were getting updated (for example, the content type with ID “0x0100EBE43BB291D8438f94E2C48C129366FF01” was not updated). Details When updating content types and...(&lt;a href="http://blogs.msdn.com/valdon/archive/2009/12/04/ff-at-the-end-of-a-content-type-id-kills-update-propagation.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9932849" width="1" height="1"&gt;</content><author><name>Valdon</name><uri>http://blogs.msdn.com/members/Valdon.aspx</uri></author><category term="SharePoint" scheme="http://blogs.msdn.com/valdon/archive/tags/SharePoint/default.aspx" /><category term="MOSS" scheme="http://blogs.msdn.com/valdon/archive/tags/MOSS/default.aspx" /><category term="Content Types" scheme="http://blogs.msdn.com/valdon/archive/tags/Content+Types/default.aspx" /></entry><entry><title>Creating Several List Instances in a Single Feature</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/valdon/archive/2009/08/06/creating-several-list-instances-in-a-single-feature.aspx" /><id>http://blogs.msdn.com/valdon/archive/2009/08/06/creating-several-list-instances-in-a-single-feature.aspx</id><published>2009-08-06T17:05:00Z</published><updated>2009-08-06T17:05:00Z</updated><content type="html">I’m not sure why I didn’t find this earlier, but I have always put a single list instance definition into a single feature. However, I recently had to put together several inter-related lists into a feature (no single list was useful by itself). The first approach was to create each list instance as a hidden feature and then have a visible feature that activated the hidden features through code in the feature receiver. This just didn’t seem like a good way to maintain this going forward since I ended...(&lt;a href="http://blogs.msdn.com/valdon/archive/2009/08/06/creating-several-list-instances-in-a-single-feature.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9859363" width="1" height="1"&gt;</content><author><name>Valdon</name><uri>http://blogs.msdn.com/members/Valdon.aspx</uri></author><category term="SharePoint" scheme="http://blogs.msdn.com/valdon/archive/tags/SharePoint/default.aspx" /><category term="MOSS" scheme="http://blogs.msdn.com/valdon/archive/tags/MOSS/default.aspx" /></entry><entry><title>Removing Extra Workflow Status Column in Default View</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/valdon/archive/2009/05/05/removing-extra-workflow-status-column-in-default-view.aspx" /><id>http://blogs.msdn.com/valdon/archive/2009/05/05/removing-extra-workflow-status-column-in-default-view.aspx</id><published>2009-05-06T05:25:48Z</published><updated>2009-05-06T05:25:48Z</updated><content type="html">When SharePoint starts a workflow on a list for the first time, it has this annoying behavior of adding a workflow status column to the default view of the list. Often times, this information is of no practical use for end users. Unfortunately, there appears to be no way of getting rid of this behavior. So instead, you have to either remove it by hand after the first instance has started, or write custom code. Luckily the code is fairly simple and can be placed anywhere you want, including inside...(&lt;a href="http://blogs.msdn.com/valdon/archive/2009/05/05/removing-extra-workflow-status-column-in-default-view.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9590222" width="1" height="1"&gt;</content><author><name>Valdon</name><uri>http://blogs.msdn.com/members/Valdon.aspx</uri></author></entry><entry><title>Using Calculated Fields to Pad Numbers with Leading Zeros</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/valdon/archive/2009/05/05/using-calculated-fields-to-pad-numbers-with-leading-zeros.aspx" /><id>http://blogs.msdn.com/valdon/archive/2009/05/05/using-calculated-fields-to-pad-numbers-with-leading-zeros.aspx</id><published>2009-05-05T23:29:00Z</published><updated>2009-05-05T23:29:00Z</updated><content type="html">Just a quick note on one way to put leading zeros in a SharePoint list field using a Calculated Field. A client wanted a column to show the list item's name, followed by a number that was left-padded with zeros to two digits, like: Addendum-01 Addendum-02 ... Turns out there's no function (at least that I could find) to do this, but using CONCATENATE, REPT and LEN function, I could do it as follows: Replace [Item Name] with the field name that contains the name and [Item Number] with the field name...(&lt;a href="http://blogs.msdn.com/valdon/archive/2009/05/05/using-calculated-fields-to-pad-numbers-with-leading-zeros.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9589616" width="1" height="1"&gt;</content><author><name>Valdon</name><uri>http://blogs.msdn.com/members/Valdon.aspx</uri></author><category term="SharePoint" scheme="http://blogs.msdn.com/valdon/archive/tags/SharePoint/default.aspx" /></entry><entry><title>How to work around bugs in the SPGridView control</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/valdon/archive/2009/03/11/how-to-work-around-bugs-in-the-spgridview-control.aspx" /><id>http://blogs.msdn.com/valdon/archive/2009/03/11/how-to-work-around-bugs-in-the-spgridview-control.aspx</id><published>2009-03-12T03:11:15Z</published><updated>2009-03-12T03:11:15Z</updated><content type="html">SharePoint has a little known web control called SPGridView. This control can give you a SharePoint list-like view of data from any data source you can bind to (from a database or other sources). It also has features to sort, filter and group the data in much the same way users can with SharePoint lists. For more information on how to use this, Paul Robinson has two great posts: SPGridView and SPMenuField: Displaying custom data through SharePoint lists Part 1 and Part 2 . In addition, Robert Fridén...(&lt;a href="http://blogs.msdn.com/valdon/archive/2009/03/11/how-to-work-around-bugs-in-the-spgridview-control.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9471155" width="1" height="1"&gt;</content><author><name>Valdon</name><uri>http://blogs.msdn.com/members/Valdon.aspx</uri></author><category term="SharePoint" scheme="http://blogs.msdn.com/valdon/archive/tags/SharePoint/default.aspx" /><category term="MOSS" scheme="http://blogs.msdn.com/valdon/archive/tags/MOSS/default.aspx" /><category term="C#" scheme="http://blogs.msdn.com/valdon/archive/tags/C_2300_/default.aspx" /></entry><entry><title>Using Both Field and FieldRef in InfoPath List Loses Data</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/valdon/archive/2009/01/23/using-both-field-and-fieldref-in-infopath-list-loses-data.aspx" /><id>http://blogs.msdn.com/valdon/archive/2009/01/23/using-both-field-and-fieldref-in-infopath-list-loses-data.aspx</id><published>2009-01-24T00:13:50Z</published><updated>2009-01-24T00:13:50Z</updated><content type="html">It appears that if you have both a Field and a FieldRef definition in your SharePoint list definition file that includes XML (InfoPath) field promotion, you can no longer update the field through the list; you must do it through the XML only. I ran into this interesting bug that took quite some time to track down. We have several site definitions that have a number of SharePoint custom lists that use a shared set of site columns. One of the custom lists is a document library containing InfoPath XML...(&lt;a href="http://blogs.msdn.com/valdon/archive/2009/01/23/using-both-field-and-fieldref-in-infopath-list-loses-data.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9373178" width="1" height="1"&gt;</content><author><name>Valdon</name><uri>http://blogs.msdn.com/members/Valdon.aspx</uri></author><category term="SharePoint" scheme="http://blogs.msdn.com/valdon/archive/tags/SharePoint/default.aspx" /><category term="MOSS" scheme="http://blogs.msdn.com/valdon/archive/tags/MOSS/default.aspx" /><category term="InfoPath" scheme="http://blogs.msdn.com/valdon/archive/tags/InfoPath/default.aspx" /></entry><entry><title>Getting To the Root (Well Almost) - Navigating the SPWeb Hierarchy</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/valdon/archive/2008/11/11/getting-to-the-root-well-almost-navigating-the-spweb-hierarchy.aspx" /><id>http://blogs.msdn.com/valdon/archive/2008/11/11/getting-to-the-root-well-almost-navigating-the-spweb-hierarchy.aspx</id><published>2008-11-12T01:13:36Z</published><updated>2008-11-12T01:13:36Z</updated><content type="html">Recently I was faced with the problem of finding an ancestor web (SPWeb object) of the current web. The ancestor needed to be the one just below the RootWeb. I quickly put together a solution that worked, but I later realized that it had massive memory "leaks" (technically, they're not memory leaks, but they have the same effect so we'll just call them leaks). For more information on this common coding problem, see Roger Lamb's excellent blog entry on this topic: http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx...(&lt;a href="http://blogs.msdn.com/valdon/archive/2008/11/11/getting-to-the-root-well-almost-navigating-the-spweb-hierarchy.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9060873" width="1" height="1"&gt;</content><author><name>Valdon</name><uri>http://blogs.msdn.com/members/Valdon.aspx</uri></author></entry><entry><title>Empty Active Directory Groups do not Show up for SharePoint 2007 Audiences</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/valdon/archive/2008/09/08/empty-active-directory-groups-do-not-show-up-for-sharepoint-2007-audiences.aspx" /><id>http://blogs.msdn.com/valdon/archive/2008/09/08/empty-active-directory-groups-do-not-show-up-for-sharepoint-2007-audiences.aspx</id><published>2008-09-09T00:27:00Z</published><updated>2008-09-09T00:27:00Z</updated><content type="html">I ran into an interesting issue at a customer site. They had dozens of newly created Active Directory groups, but only two of them were showing up when they wanted to create a new audience or specify one of the groups as a target for a list item. It turns out that SharePoint only shows Active Directory groups that contain users who have a profile imported into SharePoint. There's a simple work around: add a user to the group who also has a SharePoint user profile. This is a little inconvenient, since...(&lt;a href="http://blogs.msdn.com/valdon/archive/2008/09/08/empty-active-directory-groups-do-not-show-up-for-sharepoint-2007-audiences.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8934893" width="1" height="1"&gt;</content><author><name>Valdon</name><uri>http://blogs.msdn.com/members/Valdon.aspx</uri></author><category term="SharePoint" scheme="http://blogs.msdn.com/valdon/archive/tags/SharePoint/default.aspx" /><category term="MOSS" scheme="http://blogs.msdn.com/valdon/archive/tags/MOSS/default.aspx" /><category term="Active Directory" scheme="http://blogs.msdn.com/valdon/archive/tags/Active+Directory/default.aspx" /></entry><entry><title>Lookup Helper Methods</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/valdon/archive/2008/06/16/lookup-helper-methods.aspx" /><id>http://blogs.msdn.com/valdon/archive/2008/06/16/lookup-helper-methods.aspx</id><published>2008-06-16T17:43:00Z</published><updated>2008-06-16T17:43:00Z</updated><content type="html">Sometimes when writing custom code for SharePoint, you want to open the list to which another list field is referring (when it uses a lookup field). I had to do this to put the lookup field values in a custom menu item. Other times, you just want the SP List Item that another list item is referring to. You can do this using the SPFieldLookup and SPFieldLookupValue classes. Below are two helper functions that I wrote to do those two tasks. They may be useful to others working with lookup lists in...(&lt;a href="http://blogs.msdn.com/valdon/archive/2008/06/16/lookup-helper-methods.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8605578" width="1" height="1"&gt;</content><author><name>Valdon</name><uri>http://blogs.msdn.com/members/Valdon.aspx</uri></author><category term="SharePoint" scheme="http://blogs.msdn.com/valdon/archive/tags/SharePoint/default.aspx" /><category term="MOSS" scheme="http://blogs.msdn.com/valdon/archive/tags/MOSS/default.aspx" /><category term="C#" scheme="http://blogs.msdn.com/valdon/archive/tags/C_2300_/default.aspx" /></entry><entry><title>Wrapping Text in a SharePoint WebPart Title</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/valdon/archive/2008/04/25/wrapping-text-in-a-sharepoint-webpart-title.aspx" /><id>http://blogs.msdn.com/valdon/archive/2008/04/25/wrapping-text-in-a-sharepoint-webpart-title.aspx</id><published>2008-04-26T03:29:00Z</published><updated>2008-04-26T03:29:00Z</updated><content type="html">An interesting bit of CSS formatting behavior that I ran across recently at a customer site. They wanted to be able to have long titles in some of their web parts, but it would always make the web part zone expand to fit the text rather than wrapping the text. It turns out that the web part zone puts the title in a &amp;lt;nobr&amp;gt; tag. As anyone who has done it knows, overriding an out-of-box web part or using reflection to modify its behavior can get ugly fast. Out of curiosity, I suggested they try...(&lt;a href="http://blogs.msdn.com/valdon/archive/2008/04/25/wrapping-text-in-a-sharepoint-webpart-title.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8425069" width="1" height="1"&gt;</content><author><name>Valdon</name><uri>http://blogs.msdn.com/members/Valdon.aspx</uri></author><category term="SharePoint" scheme="http://blogs.msdn.com/valdon/archive/tags/SharePoint/default.aspx" /><category term="MOSS" scheme="http://blogs.msdn.com/valdon/archive/tags/MOSS/default.aspx" /><category term="CSS" scheme="http://blogs.msdn.com/valdon/archive/tags/CSS/default.aspx" /></entry><entry><title>Accessing images and other binary files in blob fields through SharePoint BDC</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/valdon/archive/2008/04/24/accessing-images-and-other-binary-files-in-blob-fields-through-sharepoint-bdc.aspx" /><id>http://blogs.msdn.com/valdon/archive/2008/04/24/accessing-images-and-other-binary-files-in-blob-fields-through-sharepoint-bdc.aspx</id><published>2008-04-25T06:43:00Z</published><updated>2008-04-25T06:43:00Z</updated><content type="html">There are many applications that store binary data in blob or varbinary fields of a database, including pictures, Office documents, PDFs and other types of documents. Recently, a customer had the need to display, in SharePoint, an image stored in an Oracle database. They were already indexing and displaying the other fields from the database. Since there is no out-of-box support for displaying blobs in SharePoint from the Business Data Catalog (BDC), I decided to see if I could find some way to retrieve...(&lt;a href="http://blogs.msdn.com/valdon/archive/2008/04/24/accessing-images-and-other-binary-files-in-blob-fields-through-sharepoint-bdc.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8423321" width="1" height="1"&gt;</content><author><name>Valdon</name><uri>http://blogs.msdn.com/members/Valdon.aspx</uri></author><category term="SharePoint" scheme="http://blogs.msdn.com/valdon/archive/tags/SharePoint/default.aspx" /><category term="MOSS" scheme="http://blogs.msdn.com/valdon/archive/tags/MOSS/default.aspx" /><category term="C#" scheme="http://blogs.msdn.com/valdon/archive/tags/C_2300_/default.aspx" /><category term="BDC" scheme="http://blogs.msdn.com/valdon/archive/tags/BDC/default.aspx" /><category term="SQL Server" scheme="http://blogs.msdn.com/valdon/archive/tags/SQL+Server/default.aspx" /></entry></feed>