Infopath Cascading Drop-Down (Screencast)

How do I create a cascading drop-down box in my SharePoint list?  This question is asked a lot.  Unfortunately, there is not an out-of-box way to do this in a SharePoint list.  In this screencast, you will not only learn what a cascading drop-down box is, but how to easily create one in InfoPath 2007.  

If you’ve never used InfoPath, and are wondering if you can try it, here are a couple of things to remember:

  • There are 2 types of forms: Client-based and browser based. 
    • Client-based requires end users of the form to have InfoPath software on their computers.  This is part of some suites of Microsoft Office.
    • Browser-based forms have some limitations as to field types and more advanced features, but do not require any client-side software.  They’re part of InfoPath Forms Services.
  • In order to utilize InfoPath Forms Services functionalities, like the ability to publish browser-based forms, MOSS is required.
  • If all clients who will use the form DO have InfoPath installed, then the form can be published to a SharePoint library, simply using WSS (or MOSS)

An important thing to note is that this particular solution involves field filters, which are NOT supported in browser-based forms.  This means that in order to roll-out a solution like this example, all client computers would need to have at least InfoPath 2003.

If InfoPath is not an option, and cascading drop-downs are required, there are a couple of other ways to go about it.  There is a free codeplex one http://cascddlistwithfilter.codeplex.com/ that would have to be installed on the server and deployed.  Also, there is a Bamboo Lookup Selector that can be purchased and installed on the server.  Feel free to chime in with other options.  Oh and of course, you can get a developer to custom develop one from scratch.

 

Infopath Cascading Drop-Down

 

Live Online SharePoint Saturday EMEA is on the Move

SPSEMEA-SmallLogoToni Frankola, Eric Harlan and I have been working over the past few days, putting together the first wave of speakers for Live Online SharePoint Saturday EMEA.

This is turning out to be a pretty spectacular event with presenters from 11 countries, including 6 MVPs.

If you haven’t registered for this free, live online event that is scheduled during EMEA timezones, you’re missing out. Yes, I know it’s on a Saturday. Yes, I know, there’s snow and a lot of fun to be had over the weekend. But think about it. Where are you going to be able to see presentations from people like this in one, eight hour period… for free?

�gnes Moln�r, Hungary
Ayman El-Hattab, Egypt
Boris Gomiunik, Slovenija
Christophe Humbert, China
Claudio Brotto, Italy
Daniel McPherson, The Netherlands
Dux Raymond Sy, United States
Jan Tielens, Belgium
Jerry Yasir, Saudi Arabia
Joel Oleson, United States
Laura Rogers, United States
Mark Miller, United States
Marwan Tarek, Eygpt
Michael Noel, United States
Mohamed Yehia, Eygpt
Mostafa Elzoghbi, United States
Muhanad Omar, Jordan
Nicolas Georgeault, France

That’s what I thought, so get over to the registration page and save yourself a seat. All sessions will be run over VoIP with full screen sharing so you can have a closeup view of the demos. The best way to see everything is to get a couple friends around a data projector, crank up the speakers, order in some food and drinks, and then sit back and argue about which channel to watch, since we’ll be running multiple sessions at once.

I am working on having live text chat and a live blogger for each session, so you’ll have a chance to participate in the discussion if you have a question or a comment.

Your support for this event is appreciated. If appropriate, we’d appreciate a mention in your blog or through your newsletter to help promote Live Online SharePoint Saturday EMEA.

Global starting times for Live Online SharePoint Saturday EMEA

SharePoint and jQuery for the Common Man: Resources

Mark Miller - Founder and Editor of EndUserSharePoint.comAs I start on my quest to investigate uses of jQuery in SharePoint, I’m finding some interesting resources. It seems that the problem won’t be with discovering the uses for jQuery, but how to access data that resides in SharePoint to use as data sources.

There are literally dozens of sites that show how to build images sliders, navigation structures and fun little apps. Here are a couple that have some interesting ideas:

As I said, there isn’t a lack of documented solutions available. The trick is going to be how to access data in SharePoint in order to use the jQuery solutions.

Some of the authors on EndUserSharePoint.com have tackled this in previous articles. Claudio Cabaleyro designed a charting solution using the Google API. Ming Fung Yong used SharePoint RSS feeds as his data source. Paul Grenier used the Yahoo API to build his charting solutions. Christophe Humbert has investigated ways to access SharePoint data for his visual indicators.

My first solutions are going to be simple ones, just to get a feel for how the pieces fit together in the SharePoint environment. Over the next week, I’m going to build a few different kinds of graphic display sliders using images stored in a SharePoint library. These will be hardcoded links to the images, but then I’ll start working towards dynamic integration of the images through the jQuery API using the techniques demonstrated by the authors listed above.

Look for my first, simple solutions within the next few days.

SharePoint and jQuery for the Common Man

I’ve been sitting back for the past year watching Paul Grenier and Christophe Humbert take all the glory for creating jQuery solutions in SharePoint. Jan Tielens is part of that crew, too, but way beyond my basic understanding.

I’ve had enough. It’s time for me to roll up my sleeves and dig in to some jQuery solutions just to see how easy or hard it really is.

This is all despite what Eric Shupps had to say last week about jQuery and clientside solutions. Read his article, Putting the Brakes on SharePoint with JQuery, before proceeding. Follow that up with Marc Anderson’s response, Putting the Brakes on SharePoint with JQuery – Or Not. If you’re still interested after all that, come back and read what I’m going to start working on.

Anatomy of a Challenge

My introduction to jQuery was through Paul Grenier and his jQuery for Everyone series on EndUserSharePoint.com. Then Christophe Humbert’s work with the HTMLCalc column on Path to SharePoint came to my attention. Fun stuff, but worth my time to really check it out? Instead of doing any of the dirty work myself, I worked with Paul and Christophe to develop solutions for live online workshops.

That’s been working well for the past year, but now it’s time to see what it really takes to develop my own solutions. Let’s set the ground rules first.

(Self Imposed) Rules of the Challenge

All solutions have to be able to be used in SharePoint 2007 WSS and MOSS without access to the server. The Content Editor Web Part (CEWP) is fair game, since that’s how I’ll implement the solutions. In addition, any code that is publicly available through Paul, Christophe, Jan or any other jQuery site can be used as long as there is attribution to the original source.

I will also have some other major jQuery resources at my disposal. Marc Anderson has been talking a lot about his jQuery Library for SharePoint Web Services on CodePlex, as well as Will Lawrence who is working with his team on "jPoint – jQuery for SharePoint forms, lists, webparts, and webservices". I’m might not use these right away, but they are there if needed.

A Little History

I’m not a complete novice at programming. I did a lot of work with Perl during the 90’s including building an online ticketing system for a London theatre box office group, a travel site for booking airline tickets, and an e-commerce solution for a bookstore. I was one of the first members of the Perl User Group in New York City. I’ve written a book on VoiceXML, which includes 10 projects on how to voice enable your web site.

As one of the attendees at the first XSLT conference in Oxford England, I’ve also worked a bit with XSLT. An article of mine, XML-Coursebuilder V1.0, published in the XML Journal, demonstrated how to create a modularized courseware implementation using XML for data storage and XSLT to drive the presentation layer.

There’s also an old project of mine running around somewhere that voice enables your blog comment system. People can call up your blog on the phone and leave audio comments. It never really got any traction, other than a couple hundred hardcore users, but it was a fun project written in Perl and PHP.

It’s been a couple years since I actually wrote any code, so I consider myself a beginner as I put some oil on the rusty screws of my programming chops. Even if you’ve never programmed before, I think my series will have enough basic background material to at least allow you to implement the solutions.

Where Did the Series Title Come From?

My major in college was in classical music composition. One of the earliest pieces I remember using as a composition template is "Fanfare for the Common Man" by Aaron Copland. The sound of that title rings true to me as I begin my exploration into jQuery for SharePoint.

A Final Word

I’m going to be working on this project in my "spare" time in between running EndUserSharePoint.com, moderating the weekly live online workshops and speaking at various conferences and SharePoint Saturdays. The publication of articles might be a little sporadic as I begin the process, but if the process is as exciting for a beginner as I think it’s going to be, it will become very consistent. I remember when Paul Grenier first started, he ended up publishing an article every day.

I have already built a SharePoint Scripting Resource Center using a basic SharePoint 2007 wiki. I’ll make that template available as soon as I get the subdomain setup on the new server.

So wish me luck. The first installment will be coming out in the first week of January, if not before.

SharePoint: Grab and Go

The other day I was hungry and needed to eat. I didn’t have time nor desire to sit down and enjoy a full blown meal, yet I knew I didn’t want anything fast food. I needed to refill but didn’t want a poorer quality substitute. In a local market I found the grab and go case full of salads, soup, sushi, meats and vegetables. Not the one off quantity of a 4 course meal yet I had the options of one.

Why can’t SharePoint the do the same?

The scope of all things that SharePoint can offer an organization can be overwhelming. No wonder if not implemented correctly things can go from confusing to bad. Any implementation needs to be planned, discussed, phased and have governance. This is something we all know and have heard; yet still see not done. And that’s just the on the IT and business need level.

Let’s not forget the human end user side of things. SharePoint may compete against resistance to change and other systems. Even though efficacy of effort and costs should be the decider, many times other factors come into play. You have to throw in the organization’s culture and political climate. Bad PR kills any initiative, SharePoint or not. So perhaps an inroad for SharePoint is to get its functionality out there a container at a time and not on a full blown implementation.

Maybe instead of a winner take all mentality you need to think of partnerships. How can SharePoint help if accompanying a system, not replacing it?

Case in point, a ton of money was spent last year for a client case and workflow tracking system where I work. Could SharePoint do the same with development? Possibly, but as a Super Business End User I am not at a position to suggest that especially in the face of the millions spent. But what I can do is look for what the system lacks and try to have SharePoint fill that need.

What was missing was a clear and perspective view and access to support files such as procedures, FAQs or any other satellite support documentation. What the system did support is url links.

So why not grab and go so the user can grab and go? The solution was simple; provide a SharePoint library. Just like large implementations take forethought so should small ones. Instead of creating a library within an exiting site, why not create a new site and make that home page a web part library with few links outward. Users would reference when needed to satisfy that need. The grab and go case/site is still full and waiting for its next grab and go functionality option.

Michael HinckleyAuthor: Michael Hinckley

After ten plus years of developing and managing e learning projects I have found myself in the unique position to drive the innovation at an enterprise level.

My current title is Instructor at Citibank, although training delivery is one aspect of what I do, most of my job and interests included knowledge and content management and how it can be effectively distributed. This path has led me to SharePoint technologies as the medium to deliver customized �just in time training� and knowledge solutions.

When I am not tinkering under my MOSS sites hoods and bothering the IT department regarding admin level permissions you�ll find me either at home relaxing with my wonderful wife and three children or at my boxing gym trying to improve my �sweet science� despite the science of gravity and advancing years.

[tweet]

Case Study: Using Sparklines Charts and Graphs in a SharePoint List

2009-12-22-SparkLinesEarlier this month, Christophe Humbert led a live online workshop, [slider title="SharePoint Charts and Graphs: Sparklines"]SharePoint has very limited OOTB charting options. Fortunately charting tools are plentiful on the Web, and can be integrated with SharePoint. This workshop will review some of the available options, featuring in particular Sparklines (inline charts) solutions.

With the announcement that SharePoint 2010 will include Sparkline for creating charts and graphs, the solutions provided in this workshop will give you a two to three year jump start, incorporating Sparklines into current WSS and MOSS sites.

You won’t have to purchase any third party web parts to implement these solutions. Everything will be available out of the box or available for free as part of the resources for the workshop.[/slider], on how to create miniature inline charts and graphs with Sparklines and jQuery. At the end of each live session we do, we always ask people to stay in touch to tell us what they do with the solutions they learn in the workshop.

Ken Osterkamp did a nice job of utilizing the resources. I’ll let him describe his usage in his SharePoint production environment:

"This list was developed by a national nonprofit that advocates on health care issues. It tracks votes on a single bill, HR 3590, in the United States Senate. There is a row for each Senator grouped by region. The columns track their votes, beginning with the cloture vote to begin debate on the bill, continuing through various amendments and ending with the vote on final passage. The list also feeds a dashboard, where the goal is to get 50% or higher support for the votes." — Ken Osterkamp

2009-12-22-KenOsterkamp-01

Not only did Ken build a KPI dashboard, he also used SparkLines to keep track of time based events for each row of information.

2009-12-22-KenOsterkamp-02

This is pretty exciting stuff from our point of view. Ken was able to jump into his SharePoint production environment and implement the solutions in a very short time. It makes me and Christophe really happy when we get examples of real world use of the workshop solutions.

Congratulations, Ken. Glad it all worked out. — Mark

Building a Hyperlink in an Email with SharePoint Designer

Guest Author: Jim Bob Howard

For folks very new to SharePoint�and possibly HTML, I wanted to share a quick tip sending a link to a SharePoint item via email.

I’ll assume you either know how (or can look up on EndUserSharePoint.com) how to launch SharePoint Designer (SPD) and create a workflow. So, let’s start with adding the Send an Email action:

    1. Choose Send an Email from the Actions menu
    2. Click on "this message"

    3. Click ‘this message’ to configure the email

    4. In the body of the message, we want to add a link where the ‘[ ]’ is located
    5. Replace the ‘[ ]’ with ‘<a href=""></a>’ (without the single quotes)

    6. Screen clipping taken: 12/15/2009, 1:52 PM

    7. Point your browser to an item in your list (we’re going to copy and paste the URL here)
    8. Highlight the URL in your browser

    9. Highlight the URL in your browser

    10. Press Ctrl-C to copy the URL
    11. Toggle back to SPD and paste (Ctrl-V) the URL between the double quotes

    12. In your case, ‘site,’ ‘subsite,’ and ‘listname’ will be replaced by an address specific to your site.

    13. Highlight the ‘1’ at the end of the text you just pasted in
    14. Click Add Lookup to Body
    15. In the Field dropdown, choose ID, and click OK

    16. The ‘1’ at the end of the URL was highlighted before clicking Add Lookup to Body

    17. The next step is to put text inside the anchor tag (<a href="�"></a>). That’s what will be clickable in the email. I suggest using the Title field.
    18. Place your cursor just to the left of </a> and click Add Lookup to Body again
    19. This time, choose Title in the Field dropdown.

    20. Add text for the user to click on

    21. Click OK
    22. Add any other steps and actions you choose to the workflow and click Finish

Now, whenever a new item is created, the person who created it will receive a link to that specific item via email.

If you would prefer that they are taken to the item page in edit mode, simply replace DispForm.aspx with EditForm.aspx in the text you pasted in Step 7.

Jim Bob HowardGuest Author: Jim Bob Howard
Jim Bob Howard is a web designer / web master in the healthcare industry. He has been working with SharePoint only since March 2009 and enjoys sharing what he has learned. You can email him at jimbobhoward@gmail.com.

[tweet]

SPPodCast 003 – Interview with Sahil Malik and Chris Givens




This podcast covers Sandboxed Solutions with guests Sahil Malik and Chris Givens. Unfortunately Fabian Williams was meant to join us but couldn’t make due to weather conditions in his area (he’s ok though )!

I had a "technical difficulty" where on stopping my recording in Audacity it actually crashed So I had to recover my audio timeline. So if my tone sounds a bit out it’s where I’ve re-recorded bits I couldn’t recover

People in Podcast

Chris Givens

givenscj at hotmail dot com

Website: http://www.architectingconnectedsystems.com
Position: CEO
Department: Executive
Location: Seattle, WA; San Diego, CA

Sahil Malik

sahilmalik at gmail dot com

Website: http://www.winsmarts.com
Position: Founder
Location: USA, EU

Jeremy Thake

jthake at made4the dot net

IM: jthakeuk@msn.com
Website: http://wss.made4the.net
Position: Independent Consultant
Location: Perth, Western Australia

Links

Here are the links mentioned in the show:

Please remember to check out the other podcasts and web casts available too!

A jQuery Library for SharePoint Web Services (WSS 3.0 and MOSS): Part 4 – the SPSetMultiSelectSizes Function

Guest Author: Marc D. Anderson
http://mdasblog.wordpress.com

SPSetMultiSelectSizes is a function in the jQuery Library for SharePoint Web Services that lets you set the sizes of multi-select picker boxes based on the values they contain.  This may sound trivial, but because of the way SharePoint constructs the pickers as compound controls, it’s less straightforward than you might think.

Background

In an old post on my blog, I sketched out how you could set go about Setting Multi-Select Widths in a SharePoint EditForm.aspx Using JavaScript.  The code I posted worked just fine, but took some manual tweaking every time you wanted to use it.  The basic idea is this: When SharePoint renders the multi-select control, the <div>s which contain the selects have a fixed width of 143px.  (Who knows where *that* number came from?!?!)  This is all well and good in the example below.  All of the states fit well inside the <div>s and are quite legible.

But what about the case where the values in your multi-select column are much longer? In the example below, I’m showing a multi-select column which takes its values from the list of Web Services operations which the jQuery Library for SharePoint Web Services currently supports. (Yes, I keep track of things in SharePoint lists.  Isn’t that wonderfully recursive?)  As you can see, it would be very easy to choose the wrong value from among those which start with "GetGroupCollection" unless you scroll to the right, which feels cumbersome at best.

So what I wanted to do was to build a function into the library to deal with this better, and now I have SPSetMultiSelectSizes in v0.4.8ALPHA1.  Sure, it’s an alpha, but it works; give it a whirl.

This function led me on several wild goose chases. At first, I couldn’t for the life of me think of how I could reliably figure out what the right width should be.  I wrote a post on my blog (Setting Multi-Select Picker Widths in a SharePoint Form Reliably) basically saying "Help!".  To make the function work regardless of the fontSize, fontFamily, fontWeight, etc., that a site may be using, I knew that I couldn’t take any shortcuts.  After going back and forth with the ideas I had in that post, plus several others, it finally occurred to me that I could take advantage of the jQuery clone() function for this.  What I really needed to do was to clone the existing select, tweak a few of the clone’s CSS attributes, and then use it to determine the best width for the multi-select picker boxes.

Here’s what I’ve come up with for v0.4.8ALPHA1. I expect that it will evolve a bit as it gets some real use, but the fundamental logic is sound.

If you don’t want to understand the details of the jQuery above, here it is in pseudocode.

  • Based on the column’s DisplayName on the form, find the two selects in the boxes in the multi-select picker
  • Clone the select in the left box ("possible values") and append it to the <span> which encloses the compound control
  • Change the CSS on the cloned select so that its width automatically adjusts based on its contents (this is what we’re used to selects doing most often)
  • Load all of the possible values into the clone.  We need to grab the values from both the left ("possible values") select and the right ("selected values") select.  By taking this approach, the logic works whenever it might be applied.
  • See what the width of the clone is and make a couple of small adjustments for the scroll bar and adding a little right side padding
  • Set the widths of the two boxes (actually a select wrapped in a div for each)
  • Remove the clone from the DOM, since we’re done with it

So, what does all of this work that I went through actually get you?  Well, it may not seem like much, but it’s another arrow in your quiver to use in the battle against GIGO.

Example

Going back to the example above, we’d like to have the multi-select boxes in the "Web Service Operations" multi-select picker set just wide enough so that we can see all of the values without scrolling.

Here’s what the picker looks like "out of the box"…

…and after making the call to SPSetMultiSelectSizes:

Syntax

As with all of the functions in the jQuery Library for SharePoint Web Services, everything is put in place from the UI or SharePoint Designer.  There’s nothing to install server-side.  You simply need to add references to the core jQuery library and the jQuery Library for SharePoint Web Services and then call the function.  See the documentation on the Codeplex site for more details on how to set things up.

where multiSelectColumn should indicate the column’s DisplayName on the form.

I expect I’ll be adding a few more options along the way.  A few things that come to mind:

  • Allowing you to specify an absolute width rather than having the function do the calculations for you
  • Specifying whether you want to allow the picker boxes to shrink in size, as they will currently if you have only short values

Conclusion

While this function doesn’t make any calls to the SharePoint Web Services, it seemed like a natural addition to the library.  My initial inclination was to automatically call it from $().SPServices.SPCascadeDropdowns, but I’m not sure that makes sense, as it’s pretty simple to call it separately.  As always, I’m interested in what you think and what enhancements you’d like to see.

Marc AndersonGuest Author: Marc D. Anderson
http://mdasblog.wordpress.com

Marc D. Anderson is a Co-Founder and the President of Sympraxis Consulting LLC, based in Newton, MA.  He has over 25 years of experience as a technology consultant and line manager across a wide spectrum of industries and organizational sizes.  Marc has done extensive consulting on knowledge management and collaboration and what makes them actually work in practice.  Marc is a very frequent "answerer" on the MSDN SharePoint – Design and Customization forum.

[tweet]

Excel vs SharePoint Customized Lists

2009-12-22-ExcelVsListDaniel Antion of the blog SharePoint Stories has an interesting article on Excel vs Custom Lists. This is a subject that I cover extensively in my SharePoint Power User workshops. The concept of removing content from Excel sheet that have been worked on for years is a scarey proposition.

Here’s what Daniel has to say about it:

"… spreadsheets are the definitive killer app for personal computers and Excel is a great spreadsheet. It�s just that using Excel to keep a list is a bad idea. I�m not just saying Excel is bad for lists because I�m a fan of SharePoint; it�s always been a bad idea. As long as Excel has been around, Access has been on the same menu (oh, right, unless you had Office Standard), and lists belong in a database not a spreadsheet. Why? I�m glad you asked:" (Read the entire article)

If you are looking for another resource for understanding SharePoint without wading through a bunch of geek speak, I recommend adding Daniel’s blog, SharePoint Stories, to your resources list.