Sorting Calendar Items in the Calendar View

I’m using a calendar to track panel discussions on a given day.  I have two sessions: morning and afternoon.  I want to create a view that shows morning sessions only listed alphabetically via a session ID.  This is a little tricky to accomplish (unless I missed something real obvious).

I can easily create a filtered view showing just that day’s events.  The calendar will show all those events and if they all take place on the same hour, it lists them side by side in the hour slot.  That’s great.  The tricky part is that, by default, it wants to list them in ID format.  So, if I add "Session 02" and then "Session 01" to the calendar, it shows them in that order (i.e, Session 02 and then Session 01).  To list them in Session ID order, I thought to try these things:

  1. Configure the view using the web user interface.  No luck.  There are no options to sort items this way.

    Since that didn’t work, I am now hoping there’s a CAML query somewhere in there that will allow me to override the sort.  CQWP lets me make that kind of change, maybe calendar will as well?

  2. Edit the web part,  look for an "export" function and … BZZZT!  I can’t export its XML.  There is no export option.

    I’m still holding out hope that I can find and modify some CAML query.  Since I can’t export the web part, that leaves SharePoint Designer.

  3. I add the calendar web part to a sandbox site and open that site using SharePoint Designer.  I look at the markup for the web part and I find what I’m looking for.  It’s encoded madness, but it’s there: "<ListViewXml …. >encoded madness</ListViewXml>".  Specifically, there’s this gem:

<Query>
  <Where>
    <DateRangesOverlap>
      <FieldRef Name="EventDate"/>
      <FieldRef Name="EndDate"/>
      <FieldRef Name="RecurrenceID"/>
      <Value Type="DateTime">
        <Month/>
      </Value>
    </DateRangesOverlap>
  </Where>
  <OrderBy><FieldRef Name="Session_x0020_ID" /></OrderBy>
</Query>

(I’ve decoded the &lt;’s and &gt’s and split them out to multiple lines for clarity’s sake).

Add the <OrderBy> bit and now it sorts by Session ID, not the internal list item ID.

GIGANTIC tip o’ the hat to Becky Isserman for her comment to Isha Sagi’s blog post: http://www.sharepoint-tips.com/2008/07/caml-sorting-by-file-name.html.  I wouldn’t have put the <OrderBy> in the right place without her comment.

I hope to write this up more clearly with screen shots soon, but in case I never do, at least I did this much.

</end>

NJ SharePoint User Group Meeting With Dave Mann … Or .. What Bob Said

Bob Fox lets us know that Dave Mann, SharePoint workflow genius, is speaking at the NJ SharePoint user group meeting on Wednesday evening, 11/19/08.  Don’t miss it.  (Sadly, my corporate overlord has scheduled a big group meeting Wed night and I will miss it).

Click here to register and get more details.

Here are some session details:

Session Title “Deploying Workflows in a Large Scale SharePoint Environment

Workflow in SharePoint is an exciting new capability. However, it is a capability that is often misunderstood when it comes to the impact it has on your environment. For small environments, the out-of-the-box settings, configurations and architectural approach are probably sufficient. But what about an environment that will be processing thousands of documents per day? How can you make sure that those environments will not falter under the load, but still meet SLA’s for performance and responsiveness? This session will explore why focusing on your workflow subsystem is important, and cover the needs of a large scale workflow environment from the farm level down to individual workflow design specifications. Learn why all workflows need to be looked at in light of performance and scalability as well as how to build workflows that scale in an environment that scales, monitor workflow processing and overcome common obstacles. This session will cover architectural guidance for your SharePoint environment as well as specific coding practices to ensure you get the most out of your SharePoint workflows.

</end>  

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

Technorati Tags:

SharePoint Features & Solutions Management — Don’t Forget the U in CRUD (or the D for that matter)

We collectively spend a great deal of time thinking about SharePoint solutions — how to create them, which tool to use, what happens when they fail to deploy, timer jobs, scopes, etc.  We spend so much time thinking about the up-front bits that it’s easy to forget that we need to retract them as well.  Retracting solutions is probably more difficult, from a conceptual design perspective, than deploying them.  Deployment is basically a cookbook affair.  Typically, install a feature, maybe have a feature receiver load some data into a list, that sort of thing.  However, retracting is potentially more complex.

A given solution may create artifacts like these:

  • Content Type
  • List Definition
  • Site Definition
  • Data in a list
  • Even receivers
  • InfoPath forms

The list goes on.

While it’s obviously important to design a solution that instantiates those artifacts correctly, it’s just as important to consider the update and delete cases.  If your solution creates a new list and populates that list with data, what happens when the solution is retracted?  In some cases, the list should be deleted.  In other cases, it should be left intact for historical purposes.  Your business requirements will guide you to the right decision.

To help with this, create a matrix that lists each artifact your solution deploys to SharePoint.  List three columns per artifact, one for create, update and delete.  For each case, determine the correct outcome for that operation.

This sort of analysis is obviously best done before the solution is ever deployed to a SharePoint farm.  However, like smoking, it’s never too late to start doing things correctly.  Create that matrix and develop a plan to address the missing update/delete scenarios.  It may be a hard problem to solve, but at least you’ll have put a box around the problem.

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

Technorati Tags:

SharePoint Designer Workflow Cannot Access “Remote” or “Foreign” Lists

Here’s another common SharePoint Designer workflow question:

"Can I access (read/write) SharePoint lists via workflows which do not reside on the same site as the list itself?"

The simple answer is: No.

As in so many ways, however, we have to qualify that (which is a good thing in this case).  The platform lets us create extensions to the produce in many ways, including a custom action (see my little codeplex project here for an example).  A custom action lets us do basically anything we want from SharePoint designer workflow.  I’m a big fan of this, in fact, since it gives us the best of both worlds — a declarative end-user friendly designer with the full depth of the .NET framework at our finger tips.

Sadly, if you’re using SPD, there’s a good chance you’re doing that because you can’t use visual studio (due to the fact that visual studio requires a deep developer background).  I don’t have any good answer to that problem except that you should prevail upon one of your technical co-workers to create the kind of custom action you need.  Alternatively, work with management to hire or contract that kind of resource.

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

Technorati Tags:

SharePoint on the Train

Today, I was reading through Mike Walsh’s Teach Yourself SharePoint 2007 in 24 Hours and, incredibly, the lady on the seat next me said, "We just implemented SharePoint in our company."  It’s "incredible" because people just don’t talk to me on the train 🙂  It’s funny how SharePoint was the catalyst.

The other interesting aspect was that she didn’t realize that there were books on the product.  Here comment was along the lines of "It must be pretty important if people are writing books about it."  I think everyone reading my blog would agree with that.

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

Technorati Tags:

Spinning Up Temporary Virtual WFE’s for Fun and Profit

I was one of 20 or 30 (or maybe 100?) panelists last night at the New York SharePoint Users Group meeting.  Instead of the usual presentation format, this was all about Q&A between the audience and the panel members.  Early on, Michael Lotter introduced me to a new idea and I wanted to share.

An audience member described how his company had paid a consultant to write an application for his company.  The consultant wrote it as a console application using the SharePoint object model.  As a result, this meant that the program had to be run on a server in the farm.  This meant that anyone that wanted to use the app would have to log onto the server, do the work and log off.  At first, this wasn’t a problem, but soon, more and more (non-technical) users needed to use the utility.  His question was (paraphrasing):

"What are my options?  I don’t want to keep letting users log directly onto the server, but they need that functionality."

Michael Lotter suggested that he configure a new virtual machine, join it to the farm as a WFE and let users run the application from there. 

This is a pretty stunning idea for me.  Generalizing this solution brings to mind the notion of essentially temporary, almost disposable WFE’s.  I think it’s a pretty neat concept.  This temporary WFE can run a console application that uses the SharePoint object model.  You could also use it to run stsadm commands.  It doesn’t have to be part of regular local balancing.  If it goes down or gets wrecked, you can just spin up a new one.  I repeat myself, but I just have to say that I think it’s a really neat idea.

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

Technorati Tags:

Services on Server Does Not List Search — Why?

I was chatting today with Agnes Molnar (the only person I know that I know in Hungary) about a strange search configuration problem.  Namely, search was missing from the "services on server" display (via Central Admin -> Operations -> Services on Server).

I had a look at a functional VM on my own machine and together, we determined that search was not installed on that server.  There are probably a few ways to do this, but we did it by confirming that "Office SharePoint Server Search" was missing from the list of services via Start -> Administrative Tools -> Services.

Oddly, the associated .exe *was* on the server ("C:\Program Files\Microsoft Office Servers\12.0\Bin\mssearch.exe").

I did a quick search and found this blog entry: http://msmvps.com/blogs/obts/archive/2006/10/19/189466.aspx

That’s an email chain with this key point:

"I solved this problem. It was my mistake. I choose "Web front end" instead of "Complete" during install."

This was promising, but we weren’t sure if the installer had actually picked WFE instead of complete when installing MOSS. 

We checked for the first (earliest) version of the PSCDiagnostics* file in the 12 hive log directory and in there, we found that the installer had, in fact, configured this server to be a web front end.  End of story and it had a happy ending.

(Somewhere along the line, Bob Fox got involved, but all I remember him contributing to the discussion was a comment about Fable 2).

Update: Agnes blogs about this subject here: http://dotneteers.net/blogs/aghy/archive/2008/11/06/wfe-vs-complete-installation.aspx

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

Technorati Tags:

Are Recruiters Getting a Little Aggressive?

Or is it just me?  I’ve received three or four calls at my house since late September looking for SharePoint work.  I’m used to the email solicitations, but these phone calls are a little unnerving.  I haven’t had an updated resume on a job site I(like Monster  pr Dice) since almost two years ago exactly.  And back then, my resume was all about BizTalk and MS CRM.  That’s the only place my phone number appears on line anywhere, so far as I know.

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

Technorati Tags:

Just When I’m About to Disable Comments …

They pull me back in!

Windows Live Spaces doesn’t do a good job protecting me from comment spam.  I assume MSFT has good spam detection, but that the spammers are better.  The fact remains, however, that I get far more spam comments than I get real comments and I was just thinking in the last week or so that I was going to disable comments.

However, today, I found two excellent comments in response to this post (about Limited Access) and this post (about limiting search to documents, as opposed to folders).  Those comments are so complementary (in that they add a lot of value to my post), I can’t see disabling comments and thereby closing off that avenue of useful information.  So, I’ve resigned myself to being a human spam catcher / cleaner.  Live spaces does provide a pretty decent way to clean up comments, but who wants to waste time doing that?

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

Social Computing Book for SharePoint 2007

In mid July, I was offered a chance to author two chapters for Brendon Schwartz’s and Matt Ranlett’s up-coming book, Social Computing with Microsoft SharePoint 2007: Implementing Applications for SharePoint to Enable Collaboration and Interaction in the Enterprise.  (I think they were trying to win a length contest with that title; I think they won).  I jumped on the opportunity and now, finally, the entire book is done, arriving at stores in February.

As SharePoint matures, publishers have begun to produce a new wave of books.  This book is part of that wave.  This wave builds upon the previous round of technical reference manuals explaining core features and functions and begins to describe how to use those features and functions to deliver business value in a very non-superficial way.  I’m not saying that is anything superficial about reference manuals or their value.   In fact, a book like this on Social Computing probably couldn’t have been written a year ago.  (Literally, of course it could have been written, but I don’t think the larger community would have been ready for it).  The new wave of books tends to assume the reader basically understands core features and instead describes how to use those core features in interesting new ways. 

As the title plainly says, this is a book about Social Computing.  Social Computing is a subject ripe for discussion and exploration and indeed, the discussion is well underway among early adopters.  Many companies are now quite comfortable with document libraries, content types, search, basic workflow, etc.  Having implemented and mastered these bread and butter features, they are ready for the next level.  This book offers insights and strategies to do that and thereby, exploit new and interesting opportunities that Social Computing brings to the world.

Social Computing is a big and evolving subject and covers a lot off things, including blogs, wikis, social tagging, search, interactive media, mashups, "people," and other socially-oriented "stuff."  SharePoint has a very strong story to tell in this arena and now, at this time in Internet & SharePoint history, is the time to tell it.  All things being equal between companies, those that successfully leverage Social Computing will outpace and outgrow those that do not.  The train is getting ready to leave the station and you don’t want to miss it!  This book is your ticket for a seat on that train 🙂

Bottom line, this is a blog entry pitching the book.   It’s due out in February.  Pre-order it here: Social Computing with Microsoft SharePoint 2007: Implementing Applications for SharePoint to Enable Collaboration and Interaction in the Enterprise

(Full disclosure — there’s no royalty money in it for me if you choose to buy the book, so this isn’t an effort to boost my savings account, though if it sells well, it will help out my ego, which always wants more, more, more!)

As an aside, but very important aside, I thank Bob Fox for connecting me with Brendon.  And naturally, I thank Brendon and Matt for taking a chance on a newbie such as myself and letting me author chapters in their very important book!

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

Technorati Tags: