Tuesday, June 30, 2009

On the Fence with SharePoint?

Almost a month has passed since I last blogged. June was chock-full of consulting, training and evangelizing. I have a thousand things I want to say, but they will have to wait. This post is for those people who are on the fence with SharePoint. If you have heard me speak before, you know my mantra is “Everyone has a need for SharePoint, some just don’t yet know it.” Said another way, “Every organization has a challenge for which SharePoint is a solution.” I stand by that statement.

I sometimes encounter organizations who have been on the fence with SharePoint for some time. They are hesitant to dive in for various reasons. Probably the three most common reasons are:

1) They do not know where to start…after being overloaded with the information freely available on the web

2) They are still working on their plan

3) They got a bad first impression of SharePoint when another company did a demo or one of their own good-intentioned people nonchalantly rolled out a SharePoint site

Of course there are other objections and each situation is different. In a series of posts, I want to respectfully address the objections I just mentioned. My objective is to help you off the fence and to guide you through the “maze” of information that our generous SharePoint community makes so readily available online.

Friday, May 29, 2009

InfoPath: The Solution for Forms

For many years, companies have struggled to find a data collection technique that crosses platforms, facilitates data analysis, handles both structured and unstructured data, and enables business processes. In contrast to many IT challenges where there are an abundance of tools but no clear approach, in this case the tools were just not up to par. Sure you could create forms using Word and/or Adobe PDF’s – you could even allow users to fill in the blanks online and print or email the form – but actually validating that data, extracting the data out of the form for analysis or launching workflows has proved to be both cumbersome and expensive. As a result, custom web pages have often been used to facilitate simple data collection – requiring specialized programming skills and valuable IT resources for what seemed to require rudimentary skills.

Enter Microsoft Office InfoPath – Microsoft’s answer to data collection challenges. InfoPath is a power user/novice developer tool that enables forms development based on an open XML format. The benefits of InfoPath are numerous:

  • Ease of use and development
  • Data capture and validation
  • Online and offline support (via InfoPath Form Services, Outlook or the InfoPath client)
  • Integration with both input and output data sources including databases, SharePoint lists and web services
  • Ability to save as XML, print or send as an email
  • Integration with Windows SharePoint Services and Microsoft Office SharePoint Server

By integrating with SharePoint, InfoPath offers an enterprise-level forms solution complete with business process automation and legacy software integration. Additionally, you are able to build your project teams with professionals of varying skills and levels of experience.

The InfoPath client (designer and viewer) is available as a stand-alone product or is part of the Microsoft Office Professional Plus, Enterprise and Ultimate suites. The client version integrates with Windows SharePoint Services which is included free with the Windows Server operating system. InfoPath Form Services is part of Microsoft Office SharePoint Server Enterprise Edition. Contact your Keller Schroeder sales representative to learn how to obtain InfoPath or SharePoint.

Keller Schroeder and AOS have partnered for a day of InfoPath training in Evansville on June 12, 2009. There are still seats available. For more information on InfoPath training or for a no-obligation consultation on whether InfoPath is a fit for your organization, please contact Rob Wilson by phone at 812-474-6825 or via the Contact Us link on our web site.

Friday, May 22, 2009

Using jQuery to Display Image Thumbnails in a Document Library

The SharePoint picture library is nice but unfortunately does not allow Content Approval to be used. One way to make pictures stored in a document library more accessible is to use jQuery to replace the default image icon with a thumbnail of the actual picture.

Before

Before

The following jQuery was added to a Content Editor Web Part on the All Documents view.

<SCRIPT language=javascript src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js" type=text/javascript></SCRIPT>

<SCRIPT defer type=text/javascript>
$(document).ready(function(){
$("img[src$='icjpg.gif']").each(SetImage);

});
function SetImage()
{

$(this).attr('height','100');
$(this).attr('src',$(this).parent().attr('href'));

}
</SCRIPT>

After

image

Friday, April 24, 2009

jQuery - Content Management Web Part

One of the most common requests that we have for SharePoint is the ability to make content management on a site easier and more intuitive. After seeing the potential of jQuery with SharePoint we decided to see how we could improve SharePoint content management using jQuery. What we came up with is the Content Management Web Part.


Using jQuery, icons are added above each web part on a page which give contributors to the site easy access to each web part’s properties, source and rich text editor.


Content can now be modified in one click instead of five.


image

When the pencil icon is clicked the Rich Text Editor is immediately opened.

image

When the edit icon is clicked the web part’s properties dialog is opened.

image

The video below shows the Content Management Web Part in action.

Download the Content Management Web Part

  • The content management web part consists of jQuery added to a Content Editor web part, therefore it can be uploaded to your site through the site settings page.

  • The web part currently references Google’s jQuery file. When used in a production environment this should be changed using the instruction in my previous post.

  • With this edition anyone who has the "Site Settings" link has edit authority. For a more robust roles-based solution, please contact us.

Monday, April 13, 2009

Collecting SharePoint-based Data with Forms

So you have been tasked with finding the best solution for collecting data from end users and storing it on SharePoint. Sounds like a simple task at first, but there are so many options…and how do you know which one is right for your organization? Last week, at April’s Evansville SharePoint Users Group meeting I delivered a presentation titled “Go Green with SharePoint: Gather Data Electronically.” I demonstrated several approaches for collecting data for a SharePoint site using various types of forms. I was somewhat surprised by which approach seemed to be the most intriguing to the audience – forms in Microsoft Word 2007. Let me walk you through the approaches.


First, I must say that the ideal approach for gathering forms data for SharePoint is InfoPath 2007. If you have it, make it your first choice. This is what it was created for. There is much debate over whether InfoPath is a power-user tool, developer tool or information worker tool. I think it is simply a tool for people with an aptitude for developing InfoPath forms and who have been empowered to do so. I am not going to get into licensing or how to create InfoPath forms, but suffice it to say that an organization can accomplish much in the way of data collection and workflows with InfoPath and SharePoint Designer. Learn more about it at http://office.microsoft.com/en-us/infopath/FX100487661033.aspx.


So what if you do not have InfoPath and it is definitely not an option for your organization? Here is a list of some approaches ranging from out-of-the-box SharePoint to custom-written forms integrated with SharePoint:



  • Built-in list forms When you create a new list in SharePoint, forms are created for you for adding, editing, viewing and listing items in the list. These forms are customizable using SharePoint Designer.

  • Surveys - SharePoint contains a simple wizard for creating surveys. One of the great features is that you can include/exclude questions based on the response to previous questions. Another benefit is that if the survey is not anonymous, then you can limit the responses to one per person. Just as with other SharePoint lists, the results may be downloaded to Excel and the forms may be customized using SharePoint Designer. A common customization is to show a “Thank you” message once the survey is completed rather than showing the overall survey results.

  • DataForms – I have done a series of posts on Data Forms in SharePoint Designer, so I will be brief. This approach is where we start to move more from the out-of-the-box options to the custom options. A couple of benefits are that you do not have to be a programmer per se and you can save the results to various data stores in addition to SharePoint lists.

  • Word 2007 - Many people know that you can create a form in Microsoft Word, but what you may not have known is that you can save that data directly to a SharePoint list. Here is an older blog post by the Office team to get you started. If you want more details, please leave a comment asking for more details and I will dedicate an entire post to this topic.

  • Access 2007 – If you have used linked tables in Access, then this one will seem familiar to you. SharePoint lists can be linked to Access as linked tables so they work seamlessly with Access forms, queries, reports and even email forms (new in Access 2007). Again, if you would like to see an entire post dedicated to this topic, please leave a comment.

  • Excel 2007 – Just as SharePoint lists can be exported to Excel spreadsheets, SharePoint list data can be imported from Excel spreadsheets.

  • Outlook 2007 - Outlook can display email-enabled InfoPath forms.

  • Custom .NET Webforms – Custom ASP.NET Webforms can be written using Visual Studio to read from and write to SharePoint lists. At Keller Schroeder, we have written custom SharePoint forms in ASP.NET using AJAX and Silverlight to enhance the user experience. While this provides the ultimate flexibility and user experience, it is completely custom and requires .NET web programming skills.


Each of these approaches has a place and no two organizations are the same. I would enjoy hearing about alternative approaches you may have used to collect SharePoint data.

Monday, March 23, 2009

Why SharePoint Should Be Your PMIS

A project manager’s job can be a hard road filled with twists and turns, dead ends, and potholes where you least expect them. It is not an easy job. There are many aspects to manage throughout a project, and keeping an eye on everything at all times can be tricky even on smaller projects. That’s why a Project Management Information System (PMIS) is essential. Implementing a PMIS and standardizing on how projects are managed and reported against can smooth out those bumps in the road for all levels of the organization.

In his book SharePoint for Project Management, Dux Raymond Sy provides an excellent structure for getting your PMIS started using SharePoint. What I liked most about his book was that, at its core, it was really a book about project management and good practices that help to make a project successful. These core concepts do not change, no matter what the project may be. (Come on all you project managers out there – admit it… you create a project plan for everything you do, even if it’s organizing your sock drawer!) By focusing on good project management practices, instead of just SharePoint facts and features, Dux is able to make the book resonate with project managers. As he then steps us through the relevant capabilities in SharePoint, we are able to quickly tie the “how to do it” with the “why to do it”. Of course, you can always try out one of the templates already available for tracking projects, but going through the book is also just a really good SharePoint 101 for those needing an introduction to the technology.

Okay, so we all agree that some sort of system that tracks, records, reports, and communicates is needed. Why use SharePoint for this? Why not good old Microsoft Project, or Excel, or one of the other dozens of systems out there? Well, frankly, all those options are also worthy of consideration. But, if you are already using SharePoint in your organization, why not tap into the great features of SharePoint? You have a great view for reviewing the task schedule that is similar to Microsoft Project, but it is simpler to maintain. You can update lists of tasks, issues, risks, or any other information you want to track using a datasheet view (which is similar to using Excel) but you also get all of the other great features associated with SharePoint lists -- such as alerts, built in security, and content approval. You can set up a project calendar and sync it with your Outlook calendar. Features like Announcements, Discussion Boards, and the Document Management functionality can go a long way toward facilitating communication and collaboration among team members. I am quickly becoming a huge fan of the Wiki! Wikis are great for getting all that project knowledge out of email and notes, and into SharePoint where it can be accessible to everyone and found in searches.

“But I have to report information to people who don’t have access to my SharePoint site,” you say. No problem – use the integration features within SharePoint to synchronize data between SharePoint and Project or Excel. (Heads up though, depending upon how integrated you want to be, other tools may be required.)

And why stop there? By having all of the data in SharePoint, you can roll up project data across multiple projects, allowing you to create a project management dashboard for yourself, your manager, or other stakeholders. Wouldn’t it be great to log into SharePoint and see the status of all your projects in one view? And then, with a few clicks, be able to see the details of a particular project? Yeah, this starts to get us into the realm of needing someone more technical than a project manager to set up, but it is all do-able, which is exciting stuff for us project managers!

SharePoint is not necessarily going to fulfill all project management needs for every project – let’s be clear about that. It is not necessarily a replacement for other tools like Project. However, it does fill in the gaps that other tools leave, and it can bring teams together and facilitate communication in ways that other tools cannot. So, sometimes it will make more sense to use Project independently for your project plan tracking, for example. You can still leverage SharePoint for all of the other capabilities that it brings to the table, and take advantage of something like the document library to manage updates to the Project file. The benefits you gain by getting all of the project knowledge and communication into a centralized location are still enough to make it worthwhile. I encourage you to give it a try! (Now, back to organizing that sock drawer…)

Thursday, March 12, 2009

Using the jQuery JavaScript Library in SharePoint

By now you have probably heard about jQuery, the “write less, do more” JavaScript Library. If not I would recommend a trip to their site, http://jquery.com/. jQuery makes finding and manipulating elements on a page much easier and much less painful than writing plain JavaScript.

You may be thinking “why is he talking about JavaScript on a SharePoint blog?” Well, jQuery can be used to easily enhance and modify the SharePoint user interface without having to use Visual Studio or even SharePoint Designer for that matter. This is extremely beneficial when customizing sites in a hosted environment or when you do not have remote desktop access to the SharePoint server for some other reason.

In this blog I will walk you through several ways to load the jQuery Library onto your SharePoint site or server and set up a simple hello world script. Then over several more posts I will walk through examples that show just how powerful jQuery and SharePoint can be when used together. Some examples are: hiding page elements, automatically collapsing and expanding the Quick Launch menu, enhancing the picture gallery, and the best of all… editing web part properties and content with just one mouse click.

There are several ways to get the jQuery Library onto your SharePoint page or site. I’m not going to make any claim to which method is the best; you should use the method that works best for you in your environment.

Using a document library and a Content Editor web part

This method is great for quickly adding the jQuery library to a page when you do not have SharePoint Designer.

1. Upload the jQuery Library to a document library

2. Add a Content Editor web part to your page

3. Add the following script reference to the web part using the Source Editor, making sure to change the src URL to the path of the uploaded jQuery library

<SCRIPT language=javascript src="http://<site>/<page>/<document library> /jquery-1.3.1.min.js" type=text/javascript></SCRIPT>

Spoiler: In an upcoming blog, I will show you how to use jQuery to add edit icons to all web parts on a page, making the source editor much easier to get to.

clip_image002

Using SharePoint Designer on a web page

This method is good when you want to store the library in a more permanent location that is not visible on the site or want to place the script directly in the page and not in a web part.

1. Open the site in SharePoint Designer

2. Copy the jQuery Library to the site in the same location as the default.aspx file

3. Add the jQuery reference in the page header by adding

<SCRIPT language=javascript src="jquery-1.3.1.min.js" type=text/javascript></SCRIPT>

under the following line:

<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">

4. Script can then be added to any Content Editor web part on the page or directly into the page in designer

I like to use this method to add the jQuery Library under the root web of the site. You can then reference the that jQuery file from any page by simply adding the following script in a Content Editor web part.

<SCRIPT language=javascript src="http://<site>/jquery-1.3.1.min.js" type=text/javascript></SCRIPT>

Using SharePoint Designer on the master page

This method is very similar to the one above, except that by adding the jQuery reference to the master page you will be able to use jQuery on any page in that site. Just remember that each subsite will have its own master page.

1. Open the site in SharePoint Designer

2. Navigate to the _catalogs/masterpage directory and copy the jQuery Library into the site

3. Open the default.master file

4. Add the following script to the <HEAD> section of the page

<SCRIPT language=javascript src="jquery-1.3.1.min.js" type=text/javascript></SCRIPT>

5. You will then be able to use jQuery in the master page or in any site that uses the master page

Installing a feature that adds the JQuery reference on all sites

This is a good method to add jQuery to every page in a site collection if you have the ability to install a feature on the site. Jan Tielens has created just such a feature which is available at http://smarttools.codeplex.com/ . I will not plagiarize from his blog but the basic idea is to create a web control which contains the script reference. This control is included with a feature which adds the jQuery files to the layouts directory and the jQuery reference to all SharePoint pages for which the feature is scoped.

Once you have completed one of these four methods it is time to actually use jQuery to do something on our SharePoint page. The simplest way is to create a new Content Editor Web Part on a page to which the jQuery reference was added. Or add it to the existing Content Editor Web Part if you used the first method.

Start by adding the following script using the Content Editor Source Editor:

<SCRIPT type=text/javascript>
$(document).ready(function(){
alert(“Hello”);
});
</SCRIPT>

The ready() function instructs jQuery to wait until the document is loaded and ready to be manipulated.

When you refresh your page you should now see the “Hello” alert. If so, congratulations you have successfully added jQuery to your SharePoint page. If not, try viewing the source html of the page and verifying that the jQuery reference is present and points to the correct location. Also, if you copied and pasted the code above, it is also a good idea to make sure the quotes copied correctly into the Source Editor.

Replacing the alert(“Hello”); with $("A").css("color","green"); . Will turn all links on the page to green, this is a very simple example but should give you a glimpse of just how powerful jQuery can be.

clip_image004

Before

clip_image006

After

One other thing to remember when playing with JavaScript inside of a Content Editor web part is that adding ?Contents=1 to the page URL will display the Web Part Page Maintenance page. This is helpful because it is fairly easy to break a page by entering bad JavaScript into the Content Editor Web Part, this page allows you to easily delete the web part so your page will display properly again.

In my next post I will show you additional ways to enhance the SharePoint user experience using jQuery. Until then, take a look at the examples at http://docs.jquery.com/Main_Page and think of ways to make your SharePoint experience even better.