Lars Nielsen's Discoveries

July 26, 2011

Showing recent updates with the Lightning Conductor web part

Filed under: SharePoint — Lars Nielsen @ 10:07 pm

I love using the Lightning Conductor web part.  It’s so flexible and easy to use that it can often replace a data view web part with something easier to configure and that end users can understand.  Does anyone really believe that the Data View Web Part and SharePoint Designer are end user tools?  They’re for developers only in my organisation.  But the Lightning Conductor Web Part is easy enough to understand so end users who understand SharePoint lists, libraries and columns, as well as filtering and sorting, can figure it out.

I recently wanted to configure a LCWP to show the 10 most recently updated documents in a site, across multiple document libraries.  It’s easy enough to configure it to pull data from multiple document libraries.  At first I tried setting the Item Limit in the web part properties pane to be 10, and then sorting the results by Modified date order.  But this failed to pull back some of the more recent documents.

Then I realised this was because the web part was running a query on the site first, but limited to 10 items, and then sorting those 10 results.  I wanted to query all the documents, then sort them and then pick the top 10.  To do this, you leave the Item Limit blank but instead set the Page Size property to be 10 in the web part properties, and uncheck the “Show Page buttons” box.  It’s probably a good idea also to filter the query as well, for example only select documents updated in the last week.  You can do this by setting a condition “greater than or equal” and use the Days Offset setting and set it to Today-7 days.  Otherwise the web part would need to deal with a potentially large result set (and the corresponding SQL traffic in querying across multiple lists) and you may get slow performance as the number of documents in the site grows.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

Create a free website or blog at

%d bloggers like this: