david popdan
junk, junk, and more junk
Friday, January 25, 2013
enable discussion boards in SharePoint 2010
note to self : if you try to create a "discussion board" list and it's not available, the site feature needs to be enabled:
Site Settings > Manage Site Features > activate Team Collaboration Lists
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.
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.
Friday, July 6, 2012
Friday, June 29, 2012
Subscribe to:
Posts (Atom)
