SharePoint

SharePoint Solutions

SharePoint Solution Example: How to allow users to run a SharePoint 2010 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[4]


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

ViewEvents[4]

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.  

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

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. 
Customizing MOSS 2007 and WSS sites using SharePoint Themes

We recently started an effort to provide a centralized and secure collaboration space for information sharing and collaboration across the enterprise using SharePoint 2007 and WSS.

The first phase of the project consists of a complete site redesign to provide the organization a consistent navigation and “Look and Feel” along with a consolidation of all existing SharePoint sites into a unified and secure SharePoint platform.

As part of the site redesign effort we investigated which approach would be most efficient for implementing the “Look and Feel” while also avoiding disrupting our existing WSS sites and users.

Technical Approach

The two primary choices for customizing the look and feel of both MOSS 2007 and WSS sites we evaluated were using custom alternate CSS stylesheets or using SharePoint themes. These choices would not require making significant changes to the sites’ existing masterpages and templates. For our approach we decided to start with one of the existing SharePoint themes and customize it to match our branding.

What is a SharePoint theme?

SharePoint themes represent a collection of graphics and cascading style sheets that can modify how a Web site looks. Themes can be customized using SharePoint Designer or using the Visual Studio 2008 extensions for SharePoint.

Screenshots of a customized version of a corporate theme template:

Home page News template
 Customizing MOSS 2007 and WSS sites using SharePoint Themes  Customizing MOSS 2007 and WSS sites using SharePoint Themes
Search page Site settings
 Customizing MOSS 2007 and WSS sites using SharePoint Themes  Customizing MOSS 2007 and WSS sites using SharePoint Themes

Advantages of using SharePoint themes:

  • The SharePoint site settings interface provides the ability for both site administrators and site owners to customize the look and feel of their site by selecting from a pre-defined list of available site themes.
  • The site settings interface provides the ability to display a preview/screenshot of the selected theme before they choose to apply it to their site.
  • Themes can be easily removed via the SharePoint site settings interface.
  • Themes packaged and deployed as a site feature simplify deployment across a SharePoint farm for IT administrators.
  • Developers can take advantage of the set of ten Visual Studio 2008 extensions for SharePoint projects containing design themes for SharePoint provided by Microsoft as a starting point for developing a custom theme.

Applying a site theme:

  • From Site Actions select Site Settings and then Modify All Site Settings. Under the Look and Feel section choose Themes.
  • You will find the selection of available themes to apply to your site.

Development of a custom site theme:

  • Developers can install the set of ten Visual Studio 2008 extensions for SharePoint projects containing design themes for SharePoint provided by Microsoft as a starting point for developing a custom theme.
  • You can download theme templates from: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=0a87658f-20b8-4dcc-ad7a-09ad22641f3a
  • Navigate to the installed theme folder (the default location is C:\Program Files\Microsoft\TenThemesForSharePoint)
  • Open one of the Visual Studio theme solutions in Visual Studio 2008
  • Modify the CSS classes directly in theme.css classes as needed.
  • Drop in the necessary graphics/images into the projects local image directory.
  • Build the project.

Source code for the customized version displayed above available by clicking the icon below.
Visual Studio 2008 Project files Download .zip

Deployment

  • Copy the Visual Studio project’s bin folder to your production server.
  • Locate the setup.bat file in the debug folder.
  • Open the setup.bat file in Notepad and modify the DefaultWebUrl and DefaultSiteUrl to point to the web application where you would like to install the theme.
  • Save setup.bat and run as administrator.
  • Navigate to a site and from the Site settings page select Site features, locate your theme and activate the feature.
  • Open your portal site as Administrator and go to Site Actions>Site Settings>Modify All Site Settings. Under the Look and Feel Section, click on Site Theme and choose the newly installed theme.

Observations on developing and deploying themes using the Visual Studio 2008 extensions:

  • The Visual Studio Extensions and associated theme templates are much less cumbersome than using alternate CSS style sheets IMO.
  • Being able to simply activate and de-activate the theme as a feature for both existing MOSS 2007 sites and WSS sites is a huge plus.
  • Although the ten default themes are OK as a start be prepared to make significant changes to the theme.css and providing overrides for core CSS styles as well.  For example the corporate theme looks nice in the homepage screenshot but doesn’t provide sufficient white space for readability on publishing pages, list view toolbars, list item menus, and certain viewstyles required CSS overrides.
  • Watch out when making changes to ms-vb and other core CSS styles that are referenced in a variety of related classes and can yield interesting results.
  • Themes do not inherit from parent sites so for automating deployment I developed a feature staple and attached to the default site definitions where I needed to have the them activated by default.

Have fun!

-Rod

SharePoint social networking and microblogging solution developed on SharePoint platform and WPF. 

A social networking desktop experience to notify users about updates in SharePoint blogs, document libraries, discussion lists, and wikis.  Leveraging the social graph and giving the users insight to what their coworkers are doing, to increase adoption and awareness to the advantages of SharePoint in the enterprise.
Solution Overview deck and presentation at PSSUG and http://www.aiim.org/

Screenshot of WPF client application running on users desktop delivering recent updates to the SharePoint intranet based on individual’s MySite colleague list.

Picture1

SharePointMicroblogger

Technologies used in solution: WPF, SharePoint, SQL Server.

Create a Content Rating System for Sharepoint lists/libraries using only DVWP/Linked Datasources/X-path/javascript
I had a request to create the typical content rating system you see on the web but for Sharepoint 2007-the catch? I needed to deploy as a site template that could be deployed easily by site collection owners.What did I come up with you ask?

First, it’s amazing what the new aggregate data sources in Sharepoint 2007 and x-path can do:)

You can use the new linked datasouces to access data in other lists, web services, and even SQL sources.

Then using X-path, XSL, javascript, and customizing the dataview web-part you have some options for doing interesting things in site templates that you might not have thought about before or would immediately consider server-side code a requirement.

The Approach
Displaying the ratings from within your list/document library.

contentrating

The basic approach is to tie your custom list to a second list that stores the rating using a common id. You can use javascript for this.
Then on your custom list use an x-path query to get a handle to the rows you want and then render the star rating appropriately.

Warning: I haven’t provided all the steps here and there are a few to getting the different parts of the solution connected and working together-this example covers only the bare essentials of displaying the ratings from within your list/document library but should get you off to a good start.

Coming in Part 2: The custom XSL for displaying data on the view ratings page.
Coming in Part 3: Pre-populating the ratings fields and filtering the results set by adding parameters to the aggregate datasource select query.
Coming in Part 4: How to configure a datasource to be easily deployed as part of a site template deployed within a site collection on a different server.

Implementation details in this word doc since this site can’t render code in text for some reason…
Word Version Original post: http://rodstagg.spaces.live.com/blog/cns!11725DEB07615960!176.entry

Standardized quoting and bidding solution based on SharePoint
Using SharePoint Designer Workflows to migrate data into SharePoint lists

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. 

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 that 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 one 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:

Use SharePoint Designer workflows to map the fields and import the data into existing lists. 

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 “notmigrated” 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 of 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 10,000 records involved, the Access append query we used for testing frequently timed-out or locked-up before completing. 

Cheers!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: