Using SharePoint Designer in Data View Web Part using the people picker with multiple names Display

Posted: April 7, 2015 in SharePoint2010

Introduction

 

In SharePoint SharePoint List Column Person or Group Allow multiple selections after we add multiple user in that column after config list with dataview webpart this column show like Ex. 2; #abc;3;#pqr remove special character using javascript

  1. Ex. 2; #abc;3;#pqr
  2. Ans: abc;pqr
  3. <script type=“text/javascript”>
  4.      function CleanNames(textclean) {
  5.           return text2clean.replace(/[;#0-9]+/g, “; “);
  6.      }
  7. </script>
  8. Then call it from your XSL
  9. <xsl:if test=“string-length(@Employess) != 0”>
  10.      <script type=“text/javascript”>document.write(CleanNames(“<xsl:value-of select=“@Employess” />“));</script>
  11. </xsl:if>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s