Friday, April 20, 2012

XSLT adding values to HTML tags

Two techniques for adding a value to an HTML tag:

1.  Shorthand:  <img src="{@Image}" />   

2. Longhand:

   <xsl:attribute name="src">
       <xsl:value-of select="@Image"/>

SharePoint Designer 2010 Workflow changes not taking effect

Was making changes to a workflow in SharePoint 2010 and none of my changes seemed to be taking hold when I published my workflow.  I came across this thread:

and it solved my problem.  I had to delete the files in my \local settings\app data\msft\websitecache and \app data\msft\sharepoint designer\proxyassemblycache folders.  This cleared things out and my updates were now being seen.

Remoted Desktop cut/paste stops working

If you're logged into a remote desktop session and your cut and paste functionality stops working, you can resuscitate it by doing the following:
  1. Open up task manager.
  2. Select the "rdpclip" process and click End Process
  3. Go to Start -> Run and type in "rdpclip" and you should be all set.

Delete a column in a list missing a delete button

For sealed columns (e.g. Rollup Image, etc.), there's no way to delete them from the UI.  But you can easily get around this if you use the following powershell command:

$web = Get-SPWeb -identity http://site/name/
$list = $web.Lists["ListName"]
$column = $list.Fields["Rollup Image"]
$column.Sealed = $false

Then that Delete button will be visible and you can go ahead and delete that column.

Thursday, April 19, 2012

Get the XML feeding your XSLT

Got this little tidbit from Joe Picc today, which is a good way to get the XML that's getting passed to your XSLT in your SharePoint web parts:

After your  <xsl:template match="/" ...> tag, add the following:

                      <xsl:copy-of select="." />

What gets returned is the XML that is sent to your XSLT, so if you need to check it out or debug with it you can.