Saturday, November 17, 2012

using the people picker with multiple names in a cqwp

recently when displaying the value of a people picker column in a content query web part in SharePoint 2010, I encountered some odd behavior. namely, it separates multiple names with odd characters.

Popdan, David M;#14;#Doe, John M;#31;#Smith, Bill;#25;#Money, G.

I couldn't find a way to resolve it in SharePoint, but I was able to clean it up with a simple JavaScript function.

<script type="text/javascript">
     function CleanNames(text2clean) {
          return text2clean.replace(/[;#0-9]+/g, "; ");
     }
</script>

Then call it from your XSL

<xsl:if test="string-length(@Contributors) != 0">
     <script type="text/javascript">document.write(CleanNames("<xsl:value-of select="@Contributors" />"));</script>
</xsl:if>

For now, that'll have to do.

Tuesday, February 14, 2012

kidney bean table

finished table


3/4" birch ply with walnut stain followed by tung oil followed by wipe on poly sitting on 3/8" 304L stainless steel legs