search

Simple SharePoint Search Box with Radio Buttons

So lets say you want users to be able to selectively search content from 3 (or more) different lists (The lists may or may not be on the same site). Out of the Box there is not an easy way to do this.

  • Having the user browse to each list or library and search it specifically
  • Use the site wide search which will return results from the whole site.

You could setup search scopes for each list but if you manage a large number of sites this could become a lot of work to maintain.

So the plan is to build one search box with radio buttons that will let you choose what list or scope you want to query.  Here is how I did it. 

#SharePoint Designer Custom Activities Risky?

SPD Custom Activities are an add-on many people use because they add new custom activities and conditions that can be used in SharePoint Design workflows. SPD Custom Activities give designers the ability to create more complex and powerful workflows without having to know code or use Visual Studio for development.  Check out a list of the activities and descriptions here.

These activities have many benefits for users including:

  • Make the automation of business processes easier
  • Easier to build complex applications without the help of a (costly) developer.
  • More power in the hands of the user
  • Can quickly prototype, test and deliver applications
  • Easier to manage and make changes to applications in production

On the other hand I feel it is important to consider the SPD Custom Activities from a governance and management standpoint.  If you are responsible for managing and supporting the SharePoint environment its important to consider not only how these types of solutions will help the user but how will they affect the stability of your environment?

I will discuss a few of the main risks I discovered while researching SPD Custom Activities along with Gabe Hilado of Zenpo Software.

#BCP2010 Part 1

I meant to post this last week during the conference but I was too busy or too tired to do so.

So the conference started off with an hour long keynote presentation that began with short a welcome from Bill English from Mindsharp. The welcome was follow by an hour long advertisement for Microsoft’s SharePoint MCM program. Various MCM’s came up and talked about how great the program is and how much smarter they are as a result of attending it.

Overall this session was somewhat interesting but for the most part I don’t feel that it really applied to most of the audience of the conference. There are only 24 slots available for the MCM course each quarter and the training is rather expensive ($30k). Needless to say I would not have felt bad if I had come late.

The rest of the day I attended sessions by various presenters mainly focused on the new features in SharePoint 2010. I wish there had been more sessions focused on MOSS 2007 or just general best practices because although the presentations were interesting I know it will be quite some time before I will get to use SP2010 at work.
This was my first conference and it felt good to be able to learn so much from others and talk to people who are working with the same tools. I was glad to see such a diverse group of people including developers, administrators, project managers and other users.

You can read more discussion about #BPC2010 here.

I’ll write more later but right now it’s time to get back to work.

My first #SharePoint Conference #BPC2010

So I am at the Best Practices Conference here in Reston VA. I am going to try to post about what I learn and some of my opinions on the conference as a whole.  This is my first time attending a SharePoint Conference so it should be interesting.   I hope to learn a lot about both 2007 and 2010.

Most best practices information I have read before has been pretty good but because of the many uses ad types of SharePoint deployments it seems to be very difficult to establish many best practices that will always be true no matter the size or type of your deployment.

A Better Annoucements Ticker

A while back I did a post about how to make a vertical news ticker, in the comments several people pointed out problems with the code so I decided to write a better version of the code. Here it is.

New Ticker

For this ticker I started out with a default Annoucements list. Because I wanted to display a thumbnail for each annoucement I added a signle line of text column called Subtitle and a Picture column called Picture. Here are the columns I used.
List Columns

Switch Themes Without a Page Refresh: Part 2

So in part one of this post we got all the CSS and other theme file we needed to stuck them in a document library.

With JavaScript you can change the CSS file a page uses without requiring a page refresh.  I have used this technique many times on non-SharePoint sites but there are some special challenges implementing this in SharePoint.  Most of the scripts I have used in the past use the alternate style sheet method as describred by A List Apart here. That method works fine but I had to find another way because I was already using that script to allow users to change the font size. After some research I found this script from CSS Newbie that worked pretty well without using alternate style sheets.

The problem

While the script works just fine on regular HTML pages it cause problems in SharePoint here is why :

 $("link").attr("href",$(this).attr('rel')); 

This line of code basically finds all the linked CSS files in the page and changes thier value to point to the new style sheet you select.  This is fine on a site that just uses one CSS file but in SharePoint bad things happen.  In most cases we dont want to completely remove the reference to core.css. For most themes many elements don’t need to be changed so we only have to write the CSS to change them and let core.css do the rest.  If you remove core.css its like using a global reset (discussed in more detail here) which means you will have to restyle everything.  So them point is we want to leave core.css in the page and just add our theme.

To do this I had to make some changes to the master page to create to interface users will use to swap themes.

Improving #SharePoint Forms – Watermarks

So I found this cool jQuery plugin that does watermarks for form inputs. Using watermarks is a good way to help make SharePoint forms easier to use. To test the plugin I started with the new item form from same test list I used in my previous posts.

Watermarks

Prerequisites

  • jQuery Library referenced in the page
  • CEWP on the page

Adding Comments to a List Part 2

So here is what we have done so far from Part 1   

  • Create a custom list to hold our comments
  • Link the list with an Annoucements list using lookup columns
  • Create a page to display a single annoucement and the realted comments from our comments list.

This is what it looks like:   

What we have so far.

 

 All we need to do now is setup a form on the page to allow users to create new comments on the item they are viewing.   

Adding Comments to a List Part 1

In SharePoint 2007 the only lists that offer a comments feature are the posts list in the Blog site template. Wouldn’t it be nice to allow people to post comments on other types of lists like announcements or documents? Well after lots of trial and error I figured out how to do it.

What you will need

  • Two Lists
  • SharePoint Designer
  • Basic knowledge of HTML

I’ll assume you already have a list setup on which you want to allow users to comment. For this example I will use a standard Announcements list.

So the first thing we need to do is create a list to hold our comments.  I just used the following columns:

  • Title
  • Body
  • Post  (lookup to main list’s ‘Title’ column)

In the main list you will need to add a column that points back to the comments list.

  1. Go to the list settings page and click ‘Create Column’
  2. Name the column ‘Comments‘ (the name does not really matter. Set the type to ‘Lookup
  3. The lookup should get information from the comments list you created.  The column should be set to the lookup column in the comments list.  See the screenshot below. This column will show us the number of comments each item in our list has.