Mea Culpa

imageA couple of weeks ago I wrote about how we are using SharePoint to support a Holiday Door Decorating Contest in our office. Well, the doors are decorated and the votes are in. The winning door is shown at the right, and some lucky charity is going to receive a nice donation. Unfortunately, the SharePoint part wasn’t as simple as I had hoped. Although some people think others said this first, I’m going with the fact that Albert Einstein said:

“Everything Should Be Made as Simple as Possible, But Not Simpler”

In a developer’s twist on Einstein, I would say that “perhaps I was hoping for my task to be too simple.”

I made a newbie’s mistake. I made a mistake that I shouldn’t have made. I made a mistake that many people in the SharePoint community complain about people making. I took something out of a blog, pasted it into SharePoint without taking the time to fully understand it. To make matters worse, the person who wrote the blog had explained everything very well. I glossed over that section of his post because; well because A) I was in a hurry. B) I was thinking “yeah, yeah, I get this” and C) It was a door decorating contest! I mean it’s not like the site was calculating premium for a nuclear reactor (we actually do that, so…).

As I said in my earlier post, we don’t work with images very often. In fact, all of the other times that we have worked with images, we’ve just plopped a default picture library onto a site and dumped a bunch of JPG’s into them. Here’s a partial list of things I didn’t know about picture libraries:

The default columns (file size, picture, size, selection, etc.) activate themselves when you edit a view. So, unless you turn them each time you edit a view, they show up again and your neat and tidy view looks stupid.

The thumbnail is available as an optional column that you can show in your views (I mentioned in my earlier post that I didn’t know where this could be found and I used a solution to build the link to the small image).

The thumbnail image is linked to the view properties. I wanted to have a link from the thumbnail to a full sized image, preferably one that opens in a new window, so I ended up using the solution I mentioned in my previous post anyway.

The default view of a picture library doesn’t seem to preserve all the view settings. A picture library view can show details or thumbnails or be a filmstrip but the URL is the same. Some people saw the details view (that I included in my instructions) and some saw the thumbnail view that made no sense at all since it didn’t have the link to cast the vote.

image

As for that link, the one I built to start the workflow that “casts” the vote (a.k.a. the idea I copied from the blog) I only didn’t understand one thing, but it was a comically critical thing. The GUID of that workflow changes each time the workflow is published because the workflow is versioned. That makes sense, but because I didn’t know that, I was reacting to the error I got when clicking on the link as though it was an error in my workflow. You can imagine the frustration that ensued as I kept trying to correct a workflow that really had nothing wrong with it. As I write this, I’m trying to figure out which of my friends are just laughing and which are also thinking “it serves you right” while they laugh.

Let’s count the mistakes I made:

  1. I skimmed over a blog entry, modified a solution and stuffed it into my library.
  2. I didn’t fully investigate the attributes and behavior of the SharePoint feature (the picture library) that I was using.
  3. I published a solution without having a user other than me test it. If I had had one other person test this, I would have discovered the issue with the view because the person I pick on for testing saw the thumbnail view, not the details view.
  4. I decided that the nature of the business process I was working on wasn’t worthy of my full attention and / or best effort.

I am most disappointed in myself over number 4. Everything we do in SharePoint deserves our best effort. Every project that doesn’t represent our best effort contributes to the various negative perceptions people have about SharePoint. A fun project like this is a great way to show what SharePoint can do and I almost squandered that opportunity – ho ho ho!

Note: I didn’t compound my newbie mistake by complaining to the author of the blog. I went back and studied what he wrote, pulled my head out of my … the darkness and made the library work like it should have worked at the start.

Helping Out for the Holidays

clip_image002This is always a tough time of year to write about SharePoint. Monday was the first day of our fiscal year which means it was also the first day of the process known as year-end. We also have a lot of activity associated with the policy renewals that happen on January 1st, so there usually isn’t a lot of time for SharePoint. Fortunately, a bunch of holidays occur in between our year-end and those renewals.

Last year, one of my coworkers decorated her office door. She did a great job, but there are a lot of doors and hers was the only pretty one. This year, she wanted to try and encourage others to join her. A few ideas bounced around a few heads, and a contest was born. The cool thing is that the winner gets to choose a charity to benefit from the proceeds of the contest. Of course, we’re going to use SharePoint to handle the contest. The process is pretty simple, but I learned a bunch of things about SharePoint that I didn’t know, and they might come in handy if you ever have a similar need. I didn’t figure any of this out; I just searched and picked one of many available answers. I’ve included the links here, in case they’re interesting to you.

Photos can be rated – We don’t deal with photos very often, in fact this might be the first time we are “dealing” with photos. Other photo libraries that we have are holding logos, pictures from business events we have held and pictures of things we want to put in a report. Not exactly stuff anyone cares to rate. We decided not to use this feature because we want a more direct way of choosing a winner and we don’t want to make people assign a value to every picture, but it’s pretty cool none the less.

There are Thumbnails – Well, of course there are thumbnails, that’s what we are looking at when we look at the standard library view, but those thumbnails aren’t directly available, or are they? Well, I found a short article from Stephen Wilson at Rackspace for accessing the thumbnails in SharePoint 2013. I tried his technique and it worked in our 2010 libraries as well. I spent a little time trying to wire up a related list that would show the thumbnail and let people make a choice (like a survey would be if SharePoint surveys worked better), but that didn’t pan out. The reason we’re doing this in SharePoint is because we have some remote workers who can’t see the actual doors. We don’t want them to have to go to the list, click on the thumbnail to see the photo and then go back to the list to vote. This needed to be simpler.

You can make workflows easier to use – One of the things people hate about workflows is that you have to do the whole right-click – select Workflows – select the workflow – start the workflow thing. Now you can make a really pretty page where this stuff all happens behind the scenes, but it’s year-end, and this is a simple contest. One way to simplify the workflow process is to add an HTML column that provides the shortcut to the workflow right in the item. I’ve used this method a number of times in other lists, but Varinder Singh wrote a nice blog entry on how to do it.

I’m going to opt for the workflow solution. People can look at the pictures, choose the one that they like and run the “Select as Winner” workflow. The workflow is pretty simple – it will add the name of the picture and their name to a list. A workflow in that list will throw out any previous entries that person made and a view will take care of the counting and sorting. Nothing fancy here, but it feels good to be able to say “yeah, we can do that in SharePoint” whenever somebody asks for a solution. Give us a few weeks, and I’ll post a picture of the winning door and the winner’s choice of charity.