SharePoint Guru

Rod Stagg SharePoint Solutions Architect

Home     About Us     Contact Us     Site Map     SharePoint Solutions     Silverlight     Press Releases     Blog      
Source: blog | RSS Feed
 
My interest is in extending the social computing capabilities of the SharePoint platform
and exploring my passion for Silverlight and the Windows Presentation Foundation (WPF) technologies.
 
–Rod Stagg
 
 
March 02

Creating a dynamic site page banner using SharePoint and Silverlight

Overview

How to create a dynamic banner for SharePoint 2007/2010 site pages to surface images stored within SharePoint while also making it easy for site authors to upload their own images to be displayed in the banner rotation.

Solution: 
 

  • Develop a Silverlight application to dynamically display images stored in any standard SharePoint 2007/2010 picture library.

  • Provide an easy way to configure which picture library is used to display the banner images using the Silverlight application initParams. 

  • Use the content editor web part to add the dynamic banner to SharePoint 2007/2010 site pages.

Demo:


 

Advantages:

· Easy for users to add new images to the banner.

· Works on existing SharePoint 2007/2010 picture libraries.

· Easy to deploy using Silverlight and the SharePoint content editor web-part.

· All files can be stored in SharePoint.

Download Files

Link to XAP file, test page, and content editor web-part you can use to add this functionality to your Silverlight enabled SharePoint 2007/2010 site.

Installation and Configuration of Silverlight files

 

Have fun.



11:21 PM GMT  |  Read comments(0)

February 10

Did you know? Silverlight Client for Facebook download available

Excerpt from http://www.devproconnections.com/article/silverlight-development/Microsoft-Silverlight-4-Beta-Client-for-Facebook.aspx

Here is an impressive list of Silverlight 4 features that the Facebook application leverages:

  • Out-of-browser support—fully trusted with offline capability
  • Hosting HTML content interactively—with a number of Facebook like features you’d expect
  • Local Device access (webcam)—Add a photo to a FB post using your web camera on your computer
  • Rich-Text control—distributed throughout the application
  • Embedding alternative media content—all video in FB can be played in the application
  • Desktop notifications—for status updates, etc.
  • COM integration (with Microsoft Outlook) on the Windows platform—Outlook integration with FB events and generating emails
  • Right-click—to uninstall the application and the outlook example above.
  • Drag-n-drop—pictures straight from your computer to the application
  • Window control—distributed throughout the application
  • Animations–and let’s face it—what good XAML based app doesn’t have gratuitous animations

 

FYI: I am just getting around to installing this and will have a follow-up post shortly.

Have fun!

Rod.



3:37 PM GMT  |  Read comments(0)

January 11

How to allow users to run a SharePoint Designer workflow on multiple list items.

Overview:
Design and deploy a solution based on SharePoint 2010 to store and track data on events. 

Technical Approach:

  • Use SharePoint 2010 lists, libraries, and content types to store and track event data.

  • Develop SharePoint Designer 2010 workflows to standardize and replace current manual processes and provide secured views of sensitive data. 

  • Use SharePoint Designer 2010 workflows for data migration from current Excel spreadsheets and Access database.

  • Provide customized reporting using customized SharePoint 2010 list views and Microsoft Access 2010's ability to generate reports based on data stored in SharePoint 2010. 

Challenge: How to provide the user the ability to quickly kick-off a workflow on multiple events all in the same view.

We ran into a challenge on a key requirement to allow the user to quickly kick-off a workflow on multiple events all in the same view.  Given the large number of events involved it would be a time-consuming process for the user to select each list item representing the event, edit the final event details, and run the associated workflow process to complete and close the event. 

We evaluated using one of the new out-of-the-box features of SharePoint 2010: the ability to multiple select items in a list and perform an action.   This could have been an easy way to provide the user the ability to a workflow on multiple list items- the ideal solution-simply instruct the user to select multiple list items in the default view, select the workflow button in the ribbon, and execute the workflow.  

The challenge? It appears the actions you can perform on multiple list items are limited to edit and delete, workflows are not included.   It is not clear to us if this is by design (SharePoint Designer team can jump in here and clarify if we are missing something I am sure) but since the workflow button is de-activated when selecting more than one list item and time was short we proceeded to investigate another possible solution. 

Screenshot of standard list view with multiple list items selected demonstrating the ability to edit and delete multiple items but workflow command de-activated.

ViewEvents
Screenshot of identical standard list view with a single list item selected demonstrating the ability to run a workflow against a single item only.

WorkflowSingleItem

How then to provide a mechanism in the user interface to allow the event coordinator to quickly and easily update information on multiple events without requiring a time-consuming process to open each and every event from the default SharePoint item edit view, update, and run the associated SharePoint workflow to complete the event?  Tires me just saying it. 

Solution:

Use the SharePoint multiple item form in conjunction with SharePoint Designer workflow ability to execute on list item updates.

  • Create a new field to designate the event as complete using the checkbox field type, one value for yes and no default value.

  • Create a new aspx page from the masterpage using SharePoint Designer, insert a dataview, select the appropriate fields in the datasource details pane, and insert as a multiple item form. 

  • Although multiple item forms are similiar to the datasheet view they provide the ability to customize to your scenario.

  • Add the complete column to the dataview to provide the checkboxes to designate the event as completed.

  • Set the close workflow settings to execute when an item has changed and add a condition to the workflow to check the complete status prior to execution i.e. if the event has already been closed do not execute workflow.  Easy addition would be to provide filtered views of the Event list by Complete=Yes and Complete =.

  • When the user selects the Complete event checkbox on multiple events and selects save the values in each associated list item is updated which in turn begins execution of the workflow for each list item selected. 

Screenshot of an example custom SharePoint list item form in the Multiple Item Form view.  

 CloseEventSmall

The user is able to select multiple events and designate as completed using the new Complete checkbox, update the event details using the fields in the multiple item form, and select Save.  The workflow will then begin execution on each item as they are updated.

Of course you can customize this page to suit your needs-SharePoint Designer 2010 provides a full range of options including conditional formatting, filtered views, and advanced editing mode. 

Important considerations when using customized list forms and workflows:

  • Use conditional clauses to ensure you don't create infinite loops and workflows are executed only when appropriate.

  • I recommend creating an entirely new .aspx page rather then editing the built-in list forms for adding a multiple item view when possible.

  • When editing existing list forms i.e. editform.aspx be carefull not to delete the list form control but use the web-part settings to hide instead.

Summary:

Using the SharePoint custom multiple item form is one method to provide the user a quick and easy way to edit multiple list items and an excellent alternative to the default single item edit form.

Although similar to the datasheet view multiple item forms are customizable.  

When the list is associated with a workflow the user has the ability to perform workflow actions on multiple list items as well. 



4:57 PM GMT  |  Read comments(0)

October 12

Migrating Data Into Existing SharePoint Lists using SharePoint Designer

Overview

Recently our IT department embarked on a collaborative effort with a key business stakeholder to develop a standardized quoting and bidding solution. The solution is an interim solution (2 years) replacing a current set of processes (both manual and automated). We needed to develop the solution quickly and efficiently to address a current need.

The solution:

Take advantage of SharePoint’s collaboration and document sharing features and built-in workflow capabilities for lists and document libraries to provide a standardized workflow process and centralized repository for tracking and reporting purposes.

Example SharePoint Designer Workflow

The challenge:

Migrating historical data into existing SharePoint lists and libraries.  A key requirement required migration of historical data into the new solution’s lists, document libraries, and ensure they function properly with existing SharePoint Designer workflows.

No Easy Button:

We quickly determined importing the data into SharePoint as entirely new lists from either Excel or Access by itself was not a viable option given the approximately 100 fields involved that varied in type from datasource to another.

The historical data was stored in Excel spreadsheets and Access databases.  In one case 10,000+ records were stored in a single Access 2003 database.

Solution approach for migrating the data:

To save time consider using SharePoint Designer workflows to map the fields and import the data into existing lists.  SPD workflows don’t have built-in looping but you can kick off workflows on each item in the list by setting the workflow to initiate on item edit and then use Access to append a field in each item in the list.

Steps we took to manage the migration:

  • Import the existing historical data stored in Excel Spreadsheets directly into SharePoint as new temporary lists to be deleted when migration was complete.
  • Export the data stored in the Access databases directly to temporary lists in SharePoint using the export to Windows SharePoint Services feature.
  • Develop SharePoint Designer workflows for each temporary list and set the workflow to start manually and also whenever a list item is updated.
  • Add a custom column to each list to track whether an item had been migrated. 
  • Add a workflow condition to check whether the item has already been migrated before starting the workflow i.e. if the custom migrated field equals “notmigated” initiate the workflow.
  • Add actions to create a new list item in the destination list(s) for each desired field/value from the source temporary list.
  • Add a final step to the workflow to update the current item’s migrated field to “migrated” following the creation of the new list item preventing the workflow from looping endlessly.
  • Run an append query from Access to update the custom migrated field in each list item of the temporary list.  This update initiates the workflows.
  • If necessary develop a simple Windows application to append a specific field in every row of the temporary SharePoint list.  In our case Access was timing out for our large number of records. 
  • We handled special cases for data mapping in code in specific cases where our historical data contained values not present in our new choice fields.
  • Monitor your source temporary lists and destination lists to ensure the workflow runs successfully.

Key Take-Aways:

Server Settings:
Depending on your server settings it may be necessary to update your server’s workflow settings to accommodate a large number of concurrent workflows. I changed the timeout to 25 minutes.
See http://msdn.microsoft.com/en-us/library/dd441390.aspx

Create new list items rather than copying. Creating new list items in your workflows and providing the associated mappings turned out to be more reliable than copying list items.

Re-use workflows when possible.
We saved time by reusing the same SharePoint Designer workflow on another separate list by simply replacing the listid GUID in your workflows .xoml file

CreateItemActivity ListId="{}{[yourlistsid]}" x:Name="ID30" Overwrite="False" __Context="{ActivityBind ROOT,Path=__context

Use content-types:
When working with a large number of fields consider grouping into content types if appropriate. This is especially useful if you need the ability to easily filter based on the original datasource or want to provide a specialized form based on the originating datasource.

Manage list size:

For large number of data items consider using separate lists in your solution to limit the number of total list items in any one list to 5,000 or less. 

Other Approaches we considered:

Develop the code in C# and use the SharePoint object model to both import/export the data to SharePoint and also provide the mapping of fields. Given the number of fields approached 100+ we determined handling everything in custom code was not the most efficient approach.

Use Access to import all the Excel spreadsheets into the Access database and then create append queries in Access to append the data into the existing SharePoint lists. Seems like the obvious approach but after testing with a subset of the 100+ required fields we determined ensuring that each field/data type in Access was compatible with the corresponding fields/data type in the SharePoint lists was too time-consuming.

Also, possibly related to the large number of records 10,000 involved, the Access append query we used for testing frequently timed-out or locked-up before completing.



4:06 PM GMT  |  Read comments(0)

October 10

New Corvette “Transformed” ?

b0218cdbf935427090d2f033ae20e028

I LIKE IT!  Time for another stringray.



8:07 AM GMT  |  Read comments(2)