SharePoint Beagle Newsletter - September 2008, Issue 1

SharePoint Beagle Newsletter The SharePoint Beagle Newsletter September 2008
Issue 1
Welcome!

As you can see we have given our newsletter a little face-lift.  In fact we are doing a lot of changing these days.  From a newly branded web site and community site to a whole new perspective on how we support the evolving roles and needs in the SharePoint world.  We are learning from our partners, including Microsoft, that many people didn’t know we were a SharePoint Consulting company.  What’s in a name anyway, eh?  Sure we do training, and our classes are really beginning to have the impact on the organizations that take them; and we are grateful.

We are working with new partners on some exciting new products (that are a little too new to unveil) and know they will be extremely valuable as companies continue to push the envelope on what can be done with SharePoint.

Please check out our new SharePoint Quick Start program which helps implementation teams get a huge head start at being successful.

Enjoy this issue of the Beagle as we dive deeper into the Data View Web Part and other pressing matters.  Keep your nose to the street and watch for fire hydrants!

Today's Tid-bit
The SharePoint Beagle Newsletter articles are now being maintained on the Mastering SharePoint Community site.  We are working on improving the content and navigation so stay tuned.  Regardless of the changes we are making, all the archives will still be available for your viewing.

SharePoint Beagle Newsletter Archives

Getting to Know the Data Form Web Part (Part 2 of 4)
In this 2nd part of the series, Raymond Mitchell dives a bit deeper into the Data Form Web Part (DFWP) and helps you better understand Conditional Formatting.  These techniques can be used for business dashboards, project status pages and much more.

Article
In the first article of this series we introduced the components of a Data Form Web Part. One of the core components of a Data Form Web Part is the XSL which defines how the DFWP will render. You can customize the XSL to change how the DFWP is displayed but before we jump into customizing the XSL code let’s take a look at what SharePoint Designer can do for us.

Conditional Formatting
Data Form Web Parts support conditional formatting which allows you to apply formatting and visibility rules to html elements. To work with conditional formatting you’ll need to open the Conditional Formatting task pane on a page with a Data Form Web Part. To open the task pane, open the Common Data View Tasks menu by clicking on the caret in the top-right corner of our DFWP and then select Conditional Formatting...
Read the Complete Article Here
 
Free SharePoint Findability Webinar
Search (Part 5 of 6)
This Thursday at 9:00am (PST), Bob Mixon will be delivering the 5th part on the topic of SharePoint Findability.  In this session the specific topic of SharePoint Search will be uncovered; helping you understand how it works and how to optimize it for your business needs.

If you are interested in gaining a better understand of this topic then you won't want to miss this!

Register Now
 
FarPoint Spread for SharePoint
FarPoint Spread for SharePointWith over 18 years of spreadsheet expertise it was only natural that FarPoint Technologies would provide an integrated spreadsheet for a technology as dynamic as SharePoint.

FarPoint Spread for SharePoint is a SharePoint Web Part that provides SharePoint users with a feature-rich, customizable and personalized spreadsheet for managing data in SharePoint.. Spread for SharePoint takes Web Part capabilities to the next level by addressing the needs of the SharePoint Users, SharePoint Administrators, SharePoint Developers and System Integrators.

FarPoint Technologies is excited to team with Mixon Consulting and their staff of training and consulting professionals. We look forward to working together to educate the public about the power of SharePoint and the usefulness of third part components when working with it.

Read more about FarPoint Spread for SharePoint
 
Federated Search for SharePoint
This may not be recent news; however, we have had many requests for the new Federated search features now available for SharePoint.  To be honest, the download is free and the installation quite easy!

The SharePoint Infrastructure updates, available for WSS and MOSS, will add the ability to manage Federated Connectors; many of which can be found on the Microsoft Enterprise Search site.

Before you go any further, please make sure you have a recent and accurate backup of your entire system.  You may also wish to perform this install during off-hours, it will restart IIS.

Follow the instructions provided on the Microsoft SharePoint Team Blog to install the infrastructure updates.

Once you have successfully completed the infrastructure update install, you can download and import the Federated Search Connectors.

If you would like help planning for and installing these features, please contact Mixon Consulting, Inc. at www.MixonConsulting.com.  We have staff with expertise in Enterprise Search, Installation, Configuration and Improving Search Results in your Corporate Environment.
 
Learn to Build "Real World" Solutions with SharePoint MVP Bob Mixon

Mastering SharePoint Virtually Live: Building "Real World" Solutions
The goal of this workshop is to provide students with the knowledge and skills necessary to build information/document management and collaboration solutions on Microsoft SharePoint.

The workshop will focus on the core features and functionality included in SharePoint 2007, how to use them, and how to plan and design for them.

Delivered virtually live by, 3-time Microsoft SharePoint MVP, Bob Mixon.

$100 Early Bird Special Discount.
Complete workshop description here.

10/14/2008 to 10/17/2008 - Register Now!
11/18/2008 to 11/22/2008 - Register Now!
Bamboo Solutions
Project Management Suite
Bamboo Solutions Project Management Suite
Receive a 5% discount on all purchases at the Bamboo Solutions store by entering the code TABBM08.
 
 
 
 
Mixon Consulting, Inc.
Experts with Microsoft SharePoint Products and Technologies
Copyright © Protected by Mixon Consulting, Inc. 2008, 2009 - All Rights Reserved

Getting to know the Data Form Web Part (2 of 4)

 Advanced Data Form Web Parts

In the first article of this series we introduced the components of a Data Form Web Part.  One of the core components of a Data Form Web Part is the XSL which defines how the DFWP will render.  You can customize the XSL to change how the DFWP is displayed but before we jump into customizing the XSL code let’s take a look at what SharePoint Designer can do for us.

Conditional Formatting

Data Form Web Parts support conditional formatting which allows you to apply formatting and visibility rules to html elements.  To work with conditional formatting you’ll need to open the Conditional Formatting task pane on a page with a Data Form Web Part.  To open the task pane, open the Common Data View Tasks menu by clicking on the caret in the top-right corner of our DFWP and then select Conditional Formatting:

Figure 1

Figure 1 – Opening the Conditional Formatting task pane

 

You should then see the Conditional Formatting task pane and usually one existing condition:

Figure 2

Figure 2 – The Conditional Formatting task pane

 

Note that the create button is disabled because we have not selected an HTML element to apply any conditional formatting to.  Let’s create a new Conditional Formatting rule that will change a table row’s background color based on the color selected in the list.  First, we need to select a row (which isn’t always as easy as it sounds).  If you are lucky, you can position the mouse just right to give you the option to select a row.  I find it is easier to simply select a cell and then choose select row from the menu:

Figure 3

Figure 3 – Selecting a Table Row

 

Once you have selected a row you should also see a selected <tr> in the Quick Tag Selector:

Figure 4

Figure 4 – The Quick Tag Selector

 

At this point you are ready to add a conditional formatting rule.  Choose create from the Conditional Formatting task pane and choose Apply formatting...

Figure 5

Figure 5 – Opening the Conditional Formatting task pane

 

Next we need to define when the formatting will occur by defining the condition.  In this case we’ll apply formatting when the Color field is set to Red:

Figure 6

Figure 6 – Adding Condition Criteria

 

Now we are presented with the Modify Style dialog.  From here we can define what to do when our condition is met.  In this case, we’ll just set the background color to red:

Figure 7

Figure 7 – Applying a style to your Conditional Formatting

 

Once we press OK, our conditional formatting is revealed using SharePoint Designer’s live preview:

Figure 8

Figure 8 – Live preview of Conditional Formatting in action

 

Behind the scenes

So what is really going on here?  It isn’t Magic - it is XSL.  Select your row again (if it isn’t already selected) and switch to the code view.  The corresponding html for the row you selected should be selected in the code view as well:

Figure 9

Figure 9 – XSL <tr> definition

 

The part we’re really interested in is highlighted below:

Figure 10

Figure 10 – Conditional Formatting applying style to a <tr>

 

For those of you that don’t read XSL, the attribute tag is used to add an attribute to the parent tag.  In this case it is adding a style attribute to our TR tag.  The value of the style attribute is determined by the XSL "if" statement which determines if the @Color element is equal to the text value Red.

Digging into XSL

Now that we can see what’s going on, let’s change the XSL to make it a little more useful.  We have several colors defined in our list so we probably don’t want to define a separate condition for each color.  Another option is to use the XSL "choose" tag:

Figure 11

Figure 11 – Updating the XSL by hand

 

The XSL "choose" tag allows us to configure multiple conditions and results.  The downside is that we lose the ability to see direct XSL customizations reflected in the Conditional Formatting task pane.  It does, however, allow much more complex rendering:

Figure 12

Figure 12 – Conditional Formatting in action

 

Not just pretty tables, my friend

A lot of people that are new to the Data Form Web Part use conditional formatting and custom XSL to create dashboards with highlighted lines (etc), however, that’s not all the Data Form Web Part is good for.  Some other examples I have seen include:

·         Generating customized Mobile views of SharePoint lists

·         Displaying Flash (.swf) files stored in a document library

·         Generating JavaScript that interacts with page objects such as Google/Live Maps, Windows Media Player, etc

Conclusion

The ability to customize the XSL of a Data Form Web Part is what makes it such a powerful tool for displaying data in SharePoint.  In my next article we will focus on the FORM in Data Form Web Part as we look at how to edit and save data using the Data Form Web Part.

Getting to know the Data Form Web Part (1 of 4)

What is the Data Form Web Part?

This article is the first in a four part series on the Data Form Web Part.  First things first - what is the Data Form Web Part (DFWP)?  The easiest place to start is that the DFWP is a Web Part that can be added to any SharePoint site.  Unlike most Web Parts, however, the DFWP cannot be (easily) added through the web browser - it must be created using SharePoint Designer.

 

Components of a Data Form Web Part

Before we jump into creating a DFWP, it is helpful to understand the components that make up a DFWP.  There are three main components of any Data Form Web Part:

Data Source

The DFWP supports many different data sources including:

·         SharePoint Lists and Libraries

·         An XML File

·         ODBC/SQL Database

·         Web Service

 

Or a combination of sources using a Linked Source

Parameters

Parameters can be used to make your DFWP more dynamic.  The DFWP can read parameters from several sources including the Query String, Form fields, and cookies.

XSL

Simply put, this is what defines how your DFWP displays.  The DFWP uses an XSLT stylesheet to transform data into HTML (for more information on XSL see the XSL page at the W3C:  http://www.w3.org/Style/XSL/)

Table 1 - Components of a Data Form Web Part

 

Creating a Data Form Web Part

To create a Data Form Web Part, you will need to open a page on a SharePoint site using SharePoint Designer: 

Figure 1

Figure 1 - An .aspx page in SharePoint Designer

To insert a Data Form Web Part, first select a Web Part Zone and choose Insert Data View from the Data View menu:

Figure 2

Figure 2 – Data View Menu

A Data Source Library Task Pane will appear displaying the available data sources for the current site:

Figure 3

Figure 3 - Data Source Library

In this example we’ll select an existing SharePoint List called “Stuff” and choose the Show Data option:

Figure 4

Figure 4 - Previewing the data in a Data Source

 

The Data Source Details will appear in the Task Pane displaying the fields from our list:

Figure 5

Figure 5 - Data Source Details for a SharePoint List

 

We can now select the fields we would like to display in our Data Form Web Part.  By clicking on fields while holding Control, we can select multiple fields and then choose to insert those fields as a multiple item view:

Figure 6

Figure 6 - Inserting fields into a Data Form Web Part

 

We now have a Data Form Web Part:

Figure 7

Figure 7 - Data Form Web Part in SharePoint Designer

 

Next you will want to save your page.  When you save, you will receive a prompt:

Figure 8

Figure 8 - Site Definition Page Warning

 

This prompt does not indicate an error; it simply warns you that saving will customize the page.  If you are not familiar with customizing pages (formerly referred to as “unghosting”) in SharePoint I highly recommend clicking the “About SharePoint site definitions” link.

Once saved, your Data Form Web Part will look very similar to an out of the box List View Web Part:

Figure 9

Figure 9 - Data Form Web part in Internet Explorer

 

Behind the scenes

If we modify our new Data Form Web Part in Internet Explorer, we can see some of what is happening behind the scenes.  Click on the Web Part Menu and select Modify Shared Web Part:

Figure 10

Figure 10 - Modifying our DFWP in Internet Explorer

 

In the Web Part Task Pane you will see two properties you can edit:

Figure 11

Figure 11 - DFWP properties

 

These two properties (XSL Editor and Parameters Editor) map to the components we discussed earlier in Table 1.  Note that you cannot change the Data Source outside of SharePoint Designer.  If you click on the XSL Editor, you will see the XSL that was generated for you by SharePoint Designer:

Figure 12

Figure 12 - Viewing the XSL of a DFWP in Internet Explorer

 

While the XML can be pretty tough to look at, the good news is that even if you are not an expert at XSL, if you have some HTML background you will be somewhat familiar with what you are seeing.  For example, in the section I’ve captured in figure 13 you can see that we have a few table cells.  Inside of those cells we are using some XSL markup to output the Title and Color fields.  For the Quantity field, we are first running a format-number function, and then displaying the output.

Figure 13

Figure 13 - XSL from a Data Form Web Part

 

While it is possible to make changes to the DFWP from Internet Explorer, in practice you will make most of your changes in SharePoint Designer.

 

Configuring the Data Form Web Part

If we want to configure our Data Form Web Part in SharePoint Designer, the easiest way is to open the Common Data View Tasks menu by clicking on the caret in the top-right corner of our DFWP:

Figure 14

Figure 14 - Common Data View Tasks

From the Common Data View Tasks menu we can add, remove, or reorder columns in our DFWP.  We can also apply filters and add sorting along with many other options.  For now, let’s explore how you could use Parameters in a Data Form Web Part.  If you click on the Parameters… link, you will open the Data View Parameters dialog:

Figure 15

Figure 15 – Data View Parameters dialog

 

In this example we’ll add a Color parameter that reads from the Query String:

Figure 16

Figure 16 - New Color Parameter

 

Now that we have created the parameter, we can now configure a filter for our DFWP.  Back on the Common Data View Tasks menu; select Filter to open the Filter Criteria dialog:

Figure 17

Figure 17 - Filter Criteria dialog

 

Now we’ll configure our DFWP to filter using our new parameter:

Figure 18

Figure 18 - Filter by color

 

Once our filter is applied SharePoint designer applies the filter to our live preview.  Because we did not set a default value for our Color parameter, we are presented with the “No Matching Items” template:

Figure 19

Figure 19 - DFWP “No Matching Items” template

 

To allow you to once again view what your DFWP would look like, select the “Show with sample data” option in the Common Data View Tasks Menu:

Figure 20

Figure 20 - DFWP option: Show with sample data

 

Now if we view our page in the browser and pass in a parameter we can see that our filter has been applied:

Figure 21

Figure 21 - DFWP with filter applied in the browser

 

Conclusion

As you can see, the Data Form Web Part is a highly configurable Web Part that allows you to quickly create highly customized views of your data.  In my next article we will explore some of the more advanced views you can create using the Data Form Web Part.

 

MOSS 2007 Content Deployment (4 of 4)

Introduction

This article is the last in the series of four articles on Content Deployment. We looked at some best practices and considerations in planning for and setting up content deployment. We’ve gone ahead and configured content deployment under on server farm with two separate web applications.

This article will close out the series by providing some guidance on what should happen right after content deployment is setup, list some known issues and additional recommendations.

Post Content Deployment

Now that you have configured and executed your first deployment job, it’s time to look at some additional tasks that can come handy post your deployment.

·         Now it’s probably a good time to go back to the Manage the Content Deployment Paths and Jobs page found here: _admin/Deployment.aspx and edit your Job to include only changed content.

·         Don’t forget about Version control and setting that up on the destination site collection to limit the size of your content database as well as for general performance reasons.

o   Sign In to your destination site collection: http://destinationbeagle and access the Manage Content and Structure administration page from the Site Actions menu. This page will give us a good overview of our site collection and gives us the ability to access its settings and content easily and in one place. You may even consider this administration page as one you can use to “deploy” content from one place to another in the same site collection.

 

o   From there locate your Pages library and access its settings

 

o   Click on Versioning Setting and configure version control. This will help to keep things light on your production site collection. You may do the same for all your other libraries, such as the Master Page Gallery, or Site Collection Images, or Style Library

·         For an Internet facing web site, an additional step will be required to disable the viewing of application Forms pages such as AllItems.aspx or DispForm.aspx. To do so, you will need to execute a stsadm operation to activate the lock down feature on the destination site collection.

o   Open the command prompt and change directory to: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin and execute the following command: stsadm –o activatefeature –url http://destinationbeagle –filename ViewFormPagesLockdown\feature.xml

To show how this works, I have went ahead and create a Task List, added the List to the homepage on the Source Beagle site collection, and executed the deployment job, then I ran the command stated above.

You may need to Disable Anonymous Access then Enable it back on. Anonymous Access is configure via this URL: /_layouts/setanon.aspx

Now Anonymous users are not able to access those List and Library Forms pages. They will be prompted if doing so. This feature removes the following permissions from the Limited Access permission level: View Application Pages permission, and the Use Remote Interfaces permission

·         After deploying your site collection or site, make sure to go back and review your customizations and ensure that they are set. There is a known issue with custom Master Pages and Style sheets. Access the Site Settings and ensure that your Master Page and Style sheet are configured as they are on the source farm.

 

The following URL gets you right into where you can modify settings for your site’s Master Pages: /_Layouts/ChangeSiteMasterPage.aspx

 

·         Ensure that features activated on source site collection and its sub sites are also activated on destination site collection and its sub sites

Known Errors and Fixes

The following table lists some of the known issues with Content Deployment.

Table 12 - Known Issues and Fixes

Issue

Fix

File is not checked out

http://support.microsoft.com/kb/939188

Timer Job Delay, Search Results displayed incorrectly, Language special characters displayed incorrectly

http://support.microsoft.com/kb/938536

Document Library or List when using SQL query to sort search results, whole site is deployed instead of only the sub site

http://support.microsoft.com/kb/937208

 

HTTP 500 Internal server error, User Cannot be found, Violation of primary key constraint

http://support.microsoft.com/kb/936867

 

Additional Recommendations

 

·         Do not include User Security when deploying to an Internet facing site collection. This is set on the Path editing page

·         Set anonymous access after the site collection has been deployed for an Internet facing site collection

·         Do not enable or disable features prior to deploying your site collection for the first time. It is recommended to keep that task for the deployment job

·         Plan on reviewing custom master pages and their settings after deploying your site. Content Deployment will deploy custom master pages, but may fail in setting them up and associate them with your site. Access the /_layouts/Settings.aspx page for each site and reset those Master Page settings

·         Destination site collection will need to be created with the Blank Template

·         Deploy entire site collection first and in full, then configure incremental deployment thereafter

·         Deploy parent sites then children sites

·         Mixing content deployment approaches is not recommended. For example, deploying a site collection to a new web application using database backup and restore is not recommended as a first option if you are planning on using out-of-the-box content deployment through Central Administration pages.

·         Configure version control on all Pages, Styles, and Master Page libraries on destination farm

·         Remember to configure Version control, preferably on the source site collection to limit the number of allowed versions

·         It’s recommended to schedule your content deployment jobs to run on a daily basis. These jobs can then run alongside with any development and content authoring effort.  This will allow you to find out ahead of time if a certain issue exists or deployment fails under a certain circumstance

Conclusion

Well, as you may have noticed, there was a lot to talk about in regards to content deployment. It’s great if you set it up right, and it can be a pain otherwise. Try to remember to follow and consider the recommendations presented in this series and feel free to write back to us and share your thoughts on the subject.

Till next time, happy deployments! 

Article Authored By
Johnny Harbieh, MCSD.NET, MCDBA, MCTS (WSS, MOSS)
Senior IW Engineer, CDW Berbee
 
I started my professional career in the late 90's as a developer at an e-Commerce shop. There I worked on Linux and Solaris servers developing web sites and integrating e-commerce applications with PERL, C, and Java. In the past 7 years, my work has been focused on Microsoft based technologies and solutions. My SharePoint experience range from Planning, and Deployment to Administration and Development.

I am a student at heart and a researcher in my free time. I enjoy working with SharePoint and crafting solutions to meet complex business needs.

Feel free to email me at: johnny@webeccentric.com (Please include the phrase "SharePoint Beagle" in your subject line)