Skip Ribbon Commands
Skip to main content

Bloggings by PlanetParker

:

 

View Jim Parker's profile on LinkedIn

 

 My Other WSS Sites

 
 Brother Joe's Peanuts
 NAWIC Dayton
 North Hills Community website
 Pure Drywall - Official Website
 Sylman Art Glass
Home

About Bloggings from PlanetParker

 

What’s my blog about?  Great question!  To be honest, it hasn’t hit me just yet, so in the meantime I’m just going to blog whatever comes to mind and I'll let you sort it out.  Let me know what you think about the blog so far by posting a comment.

 

 Posts

 
February 10
Version 1.0 of our SharePoint Project Team Site Template…Done!

Well, our team released version 1.0 of our new SharePoint 2010 Project Template site a couple days ago, and we're pretty happy with it. I thought I would share it since I know it's really hard to find screen shots of internal corporate SharePoint sites out in the wild, and it's nice to be able to see what others have done to help spark ideas. One of the examples I did find out there was from a past work partner of mine, Steve Hart. He has a really great project management blog called PM-Foundations. Check it out for great tips on managing projects, but also on how to use SharePoint to take your projects to the next level. I used his site for some inspiration when we were designing our template, so thanks Steve!

Our team created the following site using only SharePoint 2010 Foundation, SP Designer, and just a touch of Jquery.

The site features the following:

  1. Project tasks list:    Standard task list to capture everything from milestones to detail tasks, with the full complement of views
  2. RAID list:        Risks, Assumptions, Issues, and Decisions
  3. Project inquiry list:    A quick and easy way to manage all the questions, "small" favors, and research requests coming into your project
  4. Bug List:        A bug tracking list and workflow to keep track of project defects throughout your testing phases
  5. Status Page:        A typical dashboard for sharing the status of your project with senior management
  6. Testing Tasks:        A list to track the completion status of your test cases, integrated into the Bug List of course
  7. Document Library:    A place to store project artifacts
  8. Lookups:        Various lookup lists to allow easy maintenance of field drop-downs by the Project Manager

February 09
The Real Windows Phone Challenge:  Retail Sales Nimrods

So I stop in the AT&T store the last night to check out the new phones since I'm dragging my son into our AT&T family plan, and off of Verizon. While there, I thought I would play "secret shopper" and gauge the knowledge sales enthusiasm level for the Windows Phone to see if it had improved. There are many reports on the internet of people complaining about their experiences with sales staff when trying to get information or purchase a Windows Phone. Here was my experience last night in a local Evansville, IN store:

 

Me: I'm looking for a new smartphone for my son since we're bringing him over to our family plan from Verizon.

Sales Guy: Great, are you looking for anything in particular?

Me: Not really—just want to see what the latest and greatest is.

SG: Well, we've got the iPhone of course, and then about 10 different models with Android.

Me: <pausing to give him a moment to recall their other selections…wait for it…wait for it…> So, that's all the smartphones?

SG: Well we have BlackBerry, but that's pretty much dying out. (Okay, RIM is in big trouble, agreed, but shouldn't the consumer decide if it's an option??)

SG: The only other smartphone we really have is the Windows Phone (said with a tone of "but there's no way you're really interested in that")

Me:  Well, tell me a little bit about it--is it not good?

SGWell, it's easy to use, but the big problem is that it doesn't have hardly any apps...

Me:  Oh really, how many do they have?

SGNot very many at all...like I don't even think they have 100,000 apps yet.

Me:  <thinking...so anything less than 100,000 = no apps!?>

Me: <changing topics> So isn't Nokia coming out with some cool smartphones phones soon?

SG: Ummmm…I haven't heard anything, really. I *think* they might be coming out with something sometime before July, but I don't know much about it. I believe it's only coming out on T-Mobile at first. Not really sure, but it just will be a Windows Phone anyway…

 

So somehow the AT&T sales guy is completely unaware that Nokia is coming out with its flagship smartphone, the Lumia 900, exclusively on AT&T, within the next 60 days!!! Pathetic

February 02
How to Create Hyperlinks to a Pop-Up Dialog in SharePoint 2010

Do you like those cool SharePoint 2010 shadowbox pop-up dialogs? So do I, since it means less page navigation and general confusion for end-users. The problem is when you want to create your own custom hyperlinks from quick launch or throughout your own pages.

There are several blogs out there that show how to accomplish this using JavaScript snippets in CEWPs, etc. But there is actually a much easier way to do it using a built-in JavaScript feature of SharePoint. (Note: I have only tested this in SharePoint 2010 Foundation)

 

To do this from Quick Launch:

1. Create a new navigation link from the Quick Launch (under Site Settings)

2. Use this format for the URL—> javascript:OpenPopUpPage('http://bing.com');

image

 

To do this from HTML:

1. Use this format for your anchor reference—> <a href="javascript:OpenPopUpPage('http://bing.com');">Test Link</a>

 

Note: Obviously, replace the Bing URL with your own.

 

image

September 10
How to Expose a Printable View of a SharePoint List Item

In a world of digital, I'm continually amazed by the need for many people to get something into paper form. It's almost like it's not tangible to them until they can zip something out of their printer. Just the other day, we created a list on SharePoint to take the place of an existing paper form which tracks incidents related to system outages. Creation of the list is easy of course, but soon afterwards a requirement came make it easy for someone to click on one of the list items and be able to print out the detail. So we've gone full circle now by taking a paper form, making it electronic, just so we can convert it back to paper. J And they pay us to do this?!

At any rate, the solution is easy, and comes in true end-user deliverable fashion. The answer lies in showing the list item via the display form, but in a special dialog mode. Not the cool pop-up, shadow box dialog that you may be thinking of, however. What I'm talking about is the display form for a list item, but without any SharePoint navigational elements, quick launch, etc. Just nothin' but list item.

The can see this in action for yourself by simply appending "&IsDlg=1" to the end of your list item display form URL path. As you can see, all of the SharePoint navigational elements are gone, leaving a nice printable view via the browser Print button.

Now, while that solves the problem of creating a printable view of your list item, certainly you don't expect your end-users to append "&IsDlg=1" to the URL everytime they open an item!? Of course not.

So one way to make this easy to access is to leverage a slick solution from Christophe called the HTML Calculated Column. Essentially, this will expose a new column in your SharePoint list view that has an icon for the end-user to click when they want a printable view of that list item. It can look like this:

Cool, eh? So here's how you do it.

Step 1.

    Upload an icon of your choice to your sites' Site Assets library (or anywhere that your users have read access), and then get the URL to that uploaded file.

Here's what I chose to use à

Step 2.

Create a new column on your SharePoint list, of calculated column type. In the formula for that new column, paste this string: ="<DIV><A href='<enter URL to your list item display form>?ID="&ID&"&IsDlg=1'><img src='<replace with URL to your uploaded icon>' border=0></img></a></DIV>". Be sure to replace the sections in yellow with your target list item URL and icon URL.

Here's an example of a finshed formula: ="<DIV><A href='http://myServer/mySite/Lists/myList/DispForm.aspx?ID="&ID&"&IsDlg=1'><img src='http://myServer/SiteAssets/printpreview.PNG' border=0></img></a></DIV>"

 

Step 3.

    Follow Christophe's instructions for adding his HTML Calculated Column web part to your target list view page, and you're done!

 

Now you should have something that looks like this:

 

Go here for a live action view of this solution.

 

Hope this helps anyone needing an easy printable view.

 

 

 

 

May 04
Cascading Drop-downs in SharePoint WSS/Foundation
imageUsing SharePoint WSS or Foundation 2010? Well then you already know that there is no "feature" that allows you to provide cascading drop-downs in your list forms.
 
Cascading drop-downs allow the user to select a value from one drop-down list, and have it then auto-magically filter a subsequent drop-down, thus providing a parent-child drop-down combination. This functionality is indeed provided to users of InfoPath in the Server/Enterprise versions of SharePoint, but you're out of luck on WSS/Foundation.
 
Alas no worries, because I found a great solution provided by Boris Gomiunik on his blog here: http://www.sharepointboris.net/js/spcd.  You can download the source from CodePlex here: http://spcd.codeplex.com.  It’s a GREAT solution to a big gap in delivering business solutions in WSS/Foundation. The configuration is a bit fragile, in that renaming columns easily breaks the code, and it takes a bit of thinking to figure out where to make the changes so that it still works (well, at least for me, but perhaps I'm slow Snail…)
January 13
How to Solve Your SharePoint Rich Text Editor Blues

The Problem

So if you’ve ever tried to walk someone through the process of creating a custom web part page filled with nicely styled text and pictures, you know what a poor experience SharePoint WSS 3.0 provides.  It involves navigating all of SharePoint land, hunting for URL’s, and battling with a lame Rich Text Editor with the formatting of your content.

It goes something like this:

Step 1:  Open any custom web part page for editing, and drop a Content Editor Web Part (CEWP) onto the page.

 image

 

Step 2:  Put the CEWP web part into edit mode, and click on the Rich Text Editor buttonimage

 

Step 3:  You now get a rich text box to start typing away.  But the box is really small, so you widen it.  You start typing text and realize you want a cool picture or two to spice up the content.  So you click on the little picture button and expect to be able to browse and insert a picture.  Wrong.  You get a tiny dialog box asking for the URL to the picture. 

image

Ah huh…so then you realize that you have to actually upload the picture to your picture library ahead of time (which you didn’t because you weren’t even sure what you were going to put in your article or content until you started writing it out). 

Step 4:  So you save your current work (which looks terribly incomplete), and navigate over to your picture library so you can upload a picture or two.  You don’t know which picture is going to look just right yet, so you upload 4 or 5 just in case because you don’t want to have to do this all over again and interrupt your creative thought. 

 

Step 5:  So after uploading the pics to a library (which takes entirely too long) you then need to go grab the URL for the picture you want to use, so you view the properties of the picture and copy the URL to the clipboard. 

 

Step 6:  Then you wander back to your custom web part page, click edit a few times, and jump back into the rich text editor.  You then find a good spot within your text to drop a picture, and click on the picture button again.  This time, you’re armed with that pesky little URL, and wah-la!  You’ve got a picture displayed inside your CEWP.  Hooray!…except…you decide it’s not really aligned well within the flow of the content.  So you play around with cutting and re-pasting the picture into the rich text editor, but can’t quite figure out how to get it exactly where you want it.  You then decide that the picture needs to be a little smaller, or larger.  You select it and drag the corners to resize it of course, only to find out that it doesn’t retain the proportional width to height.  How nifty!  After fussing with it, you decide to leave it alone and move onto the rest of the content. 

 

image

Step 7:  You type happily along again until you decide you need another picture.  Oh yes, you need to go grab that new URL now…  So you go back to the picture library again to grab another picture URL.  Then a return trip to your page, edit, rich text box…okay, ready to go.  You insert the new picture, and briefly entertain the thought of moving it around, but dismiss the idea realizing how much of a PITA it was and you didn’t even get the results you like, so you forget it.  But, then you think….hmmmm…is that really the right picture

 

 

 

Step 8:  Ugh, back to the picture library to grab a different picture URL, copy it, then back to web part page, edit, rinse, spin, and repeat, and paste. 

image

 

Done!  So, now you have an article with a couple of pics which are not exactly placed where you’d like them or proportionately sized, and you ended up with a few pictures uploaded into your picture library that you didn’t even end up using after all.  But oh well, it only took 20 MINUTES!!!

Now, try training an end-user to do this on their new, spiffy SharePoint website that you created for their Glee club.  Then watch their expression as they realize they will need to go through this hoop-jumping, uploading, URL hunting, content formatting HELL, over and over and over again… every time they want to create content with pictures (which is most of time).  I can tell you, the Glee club won’t be singing your praises.

 

The Solution

Okay, so how do we solve this problem?  Better rich text editor web parts you say?  Maybe, but if you’re like me and in a shared hosting environment—no luck.  But there is a way you can make this whole process a TON better, faster, and easier.

The secret is two key ingredients:  A SharePoint Blog template, and Windows Live Writer

…and 3 simple steps:  Create, Publish, and Copy

Step 1 – Create:  Windows Live Writer (WLW) now integrates seamlessly with SharePoint sites based on the Blog template style.  This means you can use WLW to create “posts” (aka content) which you can then publish to your SP blog.  The beauty here is that WLW is a far better rich text editor, which allows you to easily draft content, import pictures (or even screen captures), links, etc., with perfect alignment, boxing, columns, or whatever you want. 

 

Step 2 – Publish:  Once you’ve put the finishing touches on the content and pictures within WLW, you simply press the publish button, and WLW takes care of not only posting the content, but also upload all of the pictures to your SP site, correctly linked and all ready to go.  How cool is that!?!

image

 

Step 3 - Copy:  So, once you’ve published the post to your SP blog, the only thing you need to do is visit the blog post, edit it, and steal the source code that SP embedded for you as part of the posting.Once you’ve got it, then simply edit a CEWP in source code mode (no stinky rich text editor!), and paste the code. 

image

Click save and WAH-LA!!!  NOW you’re cookin’ with gas!  :-)

 

The Result

 

image

Tip:  If you already have an existing SP site which was not based on the blog template, just create a sub-site using the blog template.  You can then choose to hide it or use it as a great blogging feature for your existing site, complete with RSS feeds.

September 16
Create a VisiFire Stacked Chart from a SharePoint List
UPDATED:  I have updated this post with a little more information on how to achieve this, since on my original post I was being a bit...well, lazy :-) 
 
Okay, so @jpowell490 was asking on the VisiFire forums about how to create a stacked column/bar chart with VisiFire, but pulling the data from a SharePoint list instead of hard-coded XML.  So I quickly threw together a demo which illustrated his exact needs, and provided source code, but I failed to show how to implement the code.  It's funny how I can remember reading posts where someone had dumped a bit of code on there, and feeling very frustrated because they didn't specifically tell me where in the heck to put the code.  How easy we forget :-)
 SharePoint_and_VisiFire
So anyway, let me try to step through this for folks who are interested.
 
Step 1:  I'm assuming you already know how to create a SharePoint list with the necessary fields highlighted in this demo, so I won't cover that.
 
Step 2:  Open SharePoint designer and create a new web part page (or do it through SharePoint and then open designer to edit it).
 
Step 3:  Add a data view to any web part zone, and base it off the custom list you created.  Add at least one field to the data view.
 
Step 4:  Look at the code view through SPD of your page, and find the code related to the data view web part you just created.  In that section of code you need to find and highlight the following code…and DELETE IT!
 
 
         <xsl:template match="/">
             <xsl:call-template name="dvt_1"/>
</xsl:template>
         <xsl:template name="dvt_1">
             <xsl:variable name="dvt_StyleName">Table</xsl:variable>
             <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
  <table border="0" width="100%" cellpadding="2" cellspacing="0">
   <tr valign="top">
       <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
     <th class="ms-vh" width="1%" nowrap="nowrap"></th>
    </xsl:if>
    <th class="ms-vh" nowrap="nowrap">Month</th>
    <th class="ms-vh" nowrap="nowrap">New Help Tickets</th>
    <th class="ms-vh" nowrap="nowrap">Closed Help Tickets</th>
   </tr>
      <xsl:call-template name="dvt_1.body">
          <xsl:with-param name="Rows" select="$Rows"/>
      </xsl:call-template>
  </table>
</xsl:template>
         <xsl:template name="dvt_1.body">
             <xsl:param name="Rows"/>
             <xsl:for-each select="$Rows">
                 <xsl:call-template name="dvt_1.rowview"/>
  </xsl:for-each>
</xsl:template>
         <xsl:template name="dvt_1.rowview">
  <tr>
      <xsl:if test="position() mod 2 = 1">
          <xsl:attribute name="class">ms-alternating</xsl:attribute>
   </xsl:if>
      <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
    <td class="ms-vb" width="1%" nowrap="nowrap">
     <span ddwrt:amkeyfield="ID" ddwrt:amkeyvalue="ddwrt:EscapeDelims(string(@ID))" ddwrt:ammode="view"></span>
    </td>
   </xsl:if>
   <td class="ms-vb">
    <xsl:value-of select="@Title"/>
   </td>
   <td class="ms-vb">
    <xsl:value-of select="format-number(@NewHelpTickets, '#,##0.00;-#,##0.00')"/>
   </td>
   <td class="ms-vb">
    <xsl:value-of select="format-number(@ClosedHelpTickets, '#,##0.00;-#,##0.00')"/>
   </td>
  </tr>
</xsl:template>

 
Yes, delete it!  Don't worry--we're going to add some other code instead.
 
Step 5:  Paste the following code into the section you just deleted--naturally, placement is key, so make sure you put it in the right spot:
 
         <xsl:template match="/" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
<!-- Load the chart tools -->
<script type="text/javascript" src="Visifire2.js"></script> <!-- Create the JavaScript variable that holds the data to plot. -->
<!-- Note the xsl:for-each statement which loops over all the list items and creates the necessary DataPoint entries in the Chart XML. -->
          <xsl:text disable-output-escaping="yes"><![CDATA[<script type="text/javascript">
var xmlString =
' <vc:Chart xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts"'
+ ' Width="600" Height="400" BorderThickness="1" CornerRadius="15" Theme="Theme3" View3D="False" AnimationEnabled="True" Watermark="False" Bevel="False" LightingEnabled="True" >'

+ ' <vc:Chart.AxesX>'
+ ' </vc:Chart.AxesX>'
+ ' <vc:Chart.AxesY>'
+ ' <vc:Axis Interval="50" />'
+ ' </vc:Chart.AxesY>'
 
+ ' <vc:Chart.Titles><vc:Title Text="Closed Tickets vs. New Tickets" FontSize="24" FontColor="#33CCFF" Enabled="True" FontFamily="Arial"/></vc:Chart.Titles>'

+ ' <vc:Chart.Series>'
+ ' <vc:DataSeries LegendText="Closed Tickets" RenderAs="StackedColumn" ShowInLegend="True" Bevel="True" LabelEnabled="True" LabelFontSize="14">'
+ ' <vc:DataSeries.DataPoints>'
]]></xsl:text>
  <xsl:for-each select="/dsQueryResponse/Rows/Row">

   <xsl:text disable-output-escaping="yes"><![CDATA[ + ' <vc:DataPoint AxisXLabel="]]></xsl:text><xsl:value-of select="@Title" />
   <xsl:text disable-output-escaping="yes"><![CDATA[" YValue="]]></xsl:text><xsl:value-of select="@ClosedHelpTickets" />
   <xsl:text disable-output-escaping="yes"><![CDATA["/>']]></xsl:text>
 
</xsl:for-each>
          <xsl:text disable-output-escaping="yes">

<![CDATA[                                                                                                                                                                                                                               
+ ' </vc:DataSeries.DataPoints>'
+ ' </vc:DataSeries>'
 
+ ' <vc:DataSeries LegendText="New Tickets" RenderAs="StackedColumn" ShowInLegend="True" Bevel="True" LabelEnabled="True" LabelFontSize="14">'
+ ' <vc:DataSeries.DataPoints>'
]]></xsl:text>
  <xsl:for-each select="/dsQueryResponse/Rows/Row">

   <xsl:text disable-output-escaping="yes"><![CDATA[ + ' <vc:DataPoint AxisXLabel="]]></xsl:text><xsl:value-of select="@Title" />
   <xsl:text disable-output-escaping="yes"><![CDATA[" YValue="]]></xsl:text><xsl:value-of select="@NewHelpTickets" />
   <xsl:text disable-output-escaping="yes"><![CDATA["/>']]></xsl:text>

  </xsl:for-each>
          <xsl:text disable-output-escaping="yes">

<![CDATA[                                                                                                                                                                                                                              
+ ' </vc:DataSeries.DataPoints>'
+ ' </vc:DataSeries>'

+ ' </vc:Chart.Series>'
+ ' </vc:Chart>';

</script>
]]></xsl:text>
<!-- Create the div to hold the chart and then run -->
<!-- the JavaScript code to actually show the chart. -->
<div id="VisifireChart1">
<script language="javascript" type="text/javascript">
var vChart = new Visifire2(&quot;SL.Visifire.Charts.xap&quot;,600,400);
vChart.setDataXml(xmlString);
vChart.render(&quot;VisifireChart1&quot;);
</script> </div>
</xsl:template>
 
Step 6:  The code I have provided refers to specific list fields which I created in my custom list.  If your fields are different, then obviously replace those within the code.  @Title refers to the "Month" column, and the other two columns (@NewHelpTickets and @ClosedHelpTickets) are self-explanatory.
 
Step 7:  Fire away!  You're done.
 
So here's is a live example for you to view as well, which implements the exact code mentioned above.  I hope this helps--enjoy!
 
 
 
 
 
July 24
SharePoint Data View: Dynamically Grouping People Columns

Okay, so hopefully you've found this post quickly and with minimal effort, because I couldn't imagine anyone going through the pure XSL hell that I just did these last 2 days. Yes, that's correct—two days I spent trying to figure out how to get a data view to dynamically group on a people-type column. When I say dynamically, I mean not by applying a static grouping through SharePoint Designer (although that too has its own issues), I'm talking about the nifty toolbar you can add to your data view to allow users to perform sorting, grouping, and filtering of your custom view. This is absolutely critical unless you want to spend you days and nights copying and modifying individual views to accommodate every possible sort and grouping scenario your users might come up with. At any rate, it sounds like it should be really simply, huh? Perhaps a built-in feature even, eh? Or at a minimum just using the sorting and grouping dialog correctly, right? Pffftt…yeah, I thought so too. image

(diagram above shows normal behavior when working with views within SharePoint’s end-user interface)

Here's what happens: In SharePoint designer, you first try to apply static grouping to your data view. Sure, it adds the need grouping headers, but unfortunately every entry is displayed within its own "group", which is obviously completely pointless. Here’s what it looks like:

clip_image002

Through some quick research you'll find that these people columns actually output a whole slew of data that's not actually rendered on the screen. Here's an example:

You see this: Doe, John

Sharepoint is hiding this: "<nobr><span><A HREF="/cl/XY/XYpeople/_layouts/userdisp.aspx?ID=231">Doe, John</A><img border="0" height="1" width="3" src="/_layouts/images/blank.gif"/><a href='javascript:' onclick='IMNImageOnClick();return false;' class='ms-imnlink'><img name='imnmark' title='' border='0' height='12' width='12' src='/_layouts/images/blank.gif' alt='No presence information' sip='John.Doe@Anycorp.com' id='imn_522,type=sip'/></a></span></nobr>"

 

Aside from being information overload for most purposes, it creates the very thing hated by the Group function: Uniqueness. If you look closely at the information, you see that there is a unique number embedded. What does it do? I have no idea, nor do I care. All I know is that by making each individual entry unique, my grouping won't work. So yes, don't worry, there is an easy way to truncate it so that you end up with a value that will not necessarily be unique, so you can get some grouping action going on.

No, it's not the usual "disable-output-escaping" statement…UGH!! That only fixes the display of the field in your html—it does nothing to fix the grouping problem.

Okay, so it's actually a really easy substring statement that you may have already found in your Google searches because you're better than me. If not, it looks like this:

<xsl:value-of select="substring-before(substring-after(substring-after(@ContactPerson, '?ID='), '&gt;'), '&lt;')" />

Which returns this:

"<nobr><span><A HREF="/cl/XY/XYpeople/_layouts/userdisp.aspx?ID=231">Doe, John

Notice that the id=imn_522 isn't there, only repeatable data that can easily be grouped together now. Sure, you can substring it even more to get just "Doe, John" returned, but after two days of banging my head against the keyboard trying to solve the grouping problem, I didn't bother. I'm fairly certain you could find about 2,000 other blogs with this information if you're interested.

 

Okay, so we have unique values and we're ready to watch SharePoint do some killer grouping, right!?? BUZZZ Wrong. This next part is really the key, and was the thing that eluded me for two days because it's just not documented anywhere that I could find. Now I'm sure as soon as I say that, I'll get 30 comments with links to everyone's blog with clear and easy instructions that have been out there for 2 years. Sure, maybe's it's out there. Heck, with as little sleep I've gotten lately, I'd probably miss it in my searches even if my wife posted a note on the fridge with the code. Okay, just in case you DON'T have the answer, Smarty-Pants, here it is:

Within your xsl, there is a section that deals specifically with evaluating the row data and grouping it. The problem, is that for some wholly ungodly reason, there is nothing in the code to deal with the people data type, so it just treats it as regular data and and it reads the entire string of the people column, which means that unique identifier slips in an ruins our grouping.

So in order to fix it, we need to tell the XSL to do something differently when we encounted this particular people field so that we can strip out the uniqueness part, before the grouping happens.  To do this, you simply add an xsl:choose branch to tell it to deal with people columns in the fashion mentioned above (substringing it to remove the unique identifier). The section of code you need to find is the dvt_1.body template section. In it, you'll find this block of code:

<xsl:variable name="NewGroup_adhoc">

<xsl:choose>

        <xsl:when test="$dvt_groupfield">

<xsl:value-of select="ddwrt:NameChanged(string(*[name()=$dvt_groupfield] | @*[name()=$dvt_groupfield] | current()[name(.) = $dvt_groupfield]), 0)" /></xsl:otherwise>    

        <xsl:otherwise></xsl:otherwise>

    </xsl:choose>

</xsl:variable>

 

Replace it with this block:

 

<xsl:variable name="NewGroup_adhoc">

<xsl:choose>

        <xsl:when test="$dvt_groupfield">

            <xsl:choose>

                <xsl:when test="contains($dvt_groupfield, 'ContactPerson')"> <xsl:value-of select="ddwrt:NameChanged(string(substring-before(@ContactPerson,'&lt;/A&gt;')), 0)"/></xsl:when>

                <xsl:otherwise><xsl:value-of select="ddwrt:NameChanged(string(*[name()=$dvt_groupfield] | @*[name()=$dvt_groupfield] | current()[name(.) = $dvt_groupfield]), 0)" /></xsl:otherwise>    

            </xsl:choose>

        </xsl:when>

        <xsl:otherwise></xsl:otherwise>

    </xsl:choose>

</xsl:variable>

 

WAIT!! There's one little tweak you need to make, and it's only because I'm a hack. Yes, that's right, I had to hard-code <crowd gasp> the contains criteria to distinguish the specific people field from other normal fields. I'm certain there is a way around this to make it more generic and reusable, and I actually intend to track that down later, so I'll certainly pass it along when I figure it out. For now though, in hopes that I can save you some frustration, just replace the word 'IT' in the code above with something that resembles the people field name that you're trying to group on. In my case, the actual field name was @ContactPerson. Okay, okay, it's a hack…I already said that…geez. But, it works for now, and that's all that matters.

 

image

 

Okay, I'm done here—just wanted to pass this along while it was fresh in my mind (and before I got too lazy to bother posting it). Hope it helps.

 

 

 

 

May 20
My tweetie bird flu badge got Effed!!
 
An effect created by: http://www.effmypic.com
 
If you haven't checked out this website yet, hit it now.  It takes any picture you've got and blends it into a variety of scenes that look REAL!  Very clever.
May 12
Get Your Own Money-Back Tweet Guarantee!

Inspired by my last badge and how many followers I gained as a result, I created another fun badge to show off on your blog or twitter background. In this new era of customer-service is king, you can now back your tweets with a solid, iron-clad, no if's, and's, or but's guarantee that shows your followers you are committed to their satisfaction. Well, okay, maybe not their satisfaction, but you can sure point out that they didn't actually pay a single dime for your awesome and witty tweets, so quit complaining! ;-)

Feel free to link to the source picture located here for your blog, or let me know if you'd like a different size.  Also, you can find the badge version here on my Badges page!

1 - 10Next
 

 Mac or PC?

 

1. Are you a Mac or a PC? 

     (don't get hung up on personality attributes--it's just for fun ya know)

 I'm a Mac (Shiny screens, tie dye shirts, and just totally kewl!)
 12 (21%) 
 
 I'm a PC (Brainiac, rebooting again, and practical!)
 44 (79%) 
 

Total: 56

2. Content Type


Total: 0