Showing posts from February, 2013

Conditional Formatting on List View Breaks with Hidden Columns

Interesting behavior: Conditional Formatting in SharePoint Designer requires that any fields used in the condition be shown in the view. But what if you are using calculated values as placeholders for formulas in the condition?  You probably do not want to view these.  They are like temporary variables used to derive an end result, as developers we only display intermediate variables usually when we are debugging.  Once we have it working we only show inputs and outputs. Example: Let us suppose you have been tasked to create a colorful list view that shows a due date as different colors depending on how far away the due date is.  The formatting is: (background color, bold font, larger font, border solid, white, medium top/bottom 20px left/right, padding top/bottom 3px, text-align center) Due Date = RED             if Due Date  is past or Today. Due Date = ORANGE    if Due Date  is 0-30   Days in future. Due Date = YELLOW    if Due Date  is 30-60 Days in future. Due Date = G

Move Data View Webpart to New Site Breaks

You move a Data View Webpart to a new site and it breaks. This may happen because the list you were referencing moved as well, as in you moved an entire site using export-spweb and import-spweb powershell commands. This may happen because you developed this webpart in a test or development server and it referenced a list on that system, but when importing it into a production system the list it references in the new production site is going to have a different GUID. If you open this page in SharePoint designer you will get this error: The server returned a non-specific error when trying to get data from the data source.  Check the format and content of your query and try again.  If the problem persists, contact the server administrator. Well yeah, the GUID you are referencing doesn't exist at the location you are accessing it from. TO FIX: Very simple. Visit the list where you wish to pull the data from. Choose List menu, List settings page. Look at the URL, see

Enterprise Content Type Hub

I am investigating developing a Content Type Hub for our organization.  First I must create a site collection specifically for this purpose and point to Managed Metadata Service Application at it and alter the proxy settings.  Here is a good tutorial on setting this up:

Data View Open Link in New Window

<a onfocus="OnLink(this)" href="{$url}" target="_blank"> If the onfocus attribute is not used the target will fail. Note here I am showing $url as an xsl:variable, this would need to be defined first, or just simply insert the url you want. The reason for using a variable here is you may want to concatenate some pulled in values to build query strings or other options.

Moving SharePoint 2010 Workflows in Visio

Exporting or Importing SharePoint 2010 Workflows using SharePoint Designer now requires Visio Premium 2010.  This is important because I previously had Visio Professional and it will not have the content type for Workflow - SharePoint Workflow. Another note: To import and exported SharePoint Designer Workflow into Visio, which will be an .vwi file, create a new workflow - SharePoint Workflow.  Then navigate to Process tab in ribbon  and choose Import SharePoint Workflow. I also found that Visio Check Diagram found errors in my workflow that even SharePoint Designer did not detect.  My issue was a very large workflow that should have been parallel, but I had built it sequential. If you are like me and you have a production SharePoint site you are building solutions on, but need to play with it first in a development system, you will not be able to move the workflow among the 2 systems, unless you follow these instructions. About .vwi files: .vwi files are simply .zip files th