jQuery for Everyone: Collapse or Prepopulate Form Fields

You may have seen the previous version of this script. At any rate, my goal was to create a script that required very little configuration and allowed prepopulation of any standard form field in SharePoint. This time, I’ve improved the look of "locked" fields as well as created a way to close or collapse a field, all from the URL.

For more information, examples, and an example web part, go to http://spff.codeplex.com/

Paul Grenier

Live Media Coverage of Best Practices Conference, Washington, D.C.

It’s official: Laura Rogers (@WonderLaura) and I (@EUSP) will be sitting in the catbird seat at the Best Practices Conference in Washington D.C. in August as an Official Media Sponsor! What does that mean to you, the reader? Oh, wow… read on.

If you have seen our live coverage of the Best Practices Conference in London, SharePoint Saturdays in Atlanta and in DC, and St. Louis Moss Camp, you’ve got an idea of what we’re up to. We will be sending live bloggers to each of the main tracks to give full coverage of sessions, including live notes, pictures, video, interviews, anything we can get our hands on. There will be multiple on-line Twitter boards, rendering the information flow coming from the tweets of all the attendees.

In addition, we’ll have a table on the conference floor doing live interviews and getting real feedback from participants as they walk by. John Anderson, from Bamboo Nation, will be sitting with us, helping to send as much real time information as possible to those who aren’t able to make it to the conference.

Speakers from the conference will be contributing articles to EndUserSharePoint.com, we’ll do some recorded interviews, and we’ll be on top of all the details as things are rolling out in the month preceeding the event.

Not sure how many days left until the conference? Look in the top, left column of this page for a countdown timer, or better yet, download this little web part and put it on your own site.

That’s the warmup. I’ll keep you posted as to how things are progressing, but save the date, August 24 -26, for live coverage of the Best Practices Conference in Washington, D.C.

Tweet streams to follow:

  • @EUSP – Mark Miller
  • @WonderLaura – Laura Rogers
  • @BPConference – Official tweet for the conference
  • #BPC09 – Twitter hash tag for all conference tweets

Free download: Countdown to Best Practices Conference Web Part

Some days I’ve just got to take a mental break and have a little fun. This morning I created a simple web part that shows a dynamic countdown to the days, hours, minutes and seconds until the Best Practices, Washington, DC Conference kicks off. Look to the left of the page here and you can see it at work at the top of the column.

Being the kind of guy I am, I thought of you and said, "Hey, maybe other people would like to display this on their SharePoint site!" Ok, here you go. Download it, put it on any SharePoint page and it’s ready to go.

For those running an https connection, you’ll get a security warning because the image is pointing to my server. I’m including a copy of the image I used so you can have the entire thing on your server, if you’d like.

I’d appreciate it if you’d leave me a note below to say you’re using it. I’m going to create one for SPTechCon, Boston and SharePoint Conference 2009, Las Vegas when I get a spare minute.

Hope you like it. — Mark

Taming the Elusive �Calculated Column� – Date and Time – Part 2

Deciphering the Puzzle (v1.0)

Back to our formula, lets convert it into �plain English� (or close to, at least) to see just what�s occurring in the logic being processed:

The formula:

=IF(AND((WEEKDAY([End Date],2))<(WEEKDAY([Start Date],2)),((WEEKDAY([Start Date],2))-(WEEKDAY([End Date],2)))>1),(((DATEDIF([Start Date],[End Date],"D")+1))-(FLOOR((DATEDIF([Start Date],[End Date],"D")+1)/7,1)*2)-2),(((DATEDIF([Start Date],[End Date],"D")+1))-(FLOOR((DATEDIF([Start Date],[End Date],"D")+1)/7,1)*2)))

The (albeit somewhat confusing) translation:

If the number of the day of the week in the �End Date� column (with �1� equaling �Monday� through �7� equaling �Sunday�) is less than the number of the day of the week in the �Start Date� column (with �1� equaling �Monday� through �7� equaling �Sunday�), AND the number of the day of the week in the �Start Date� column (with �1� equaling �Monday� through �7� equaling �Sunday�) minus the number of the day of the week in the �End Date� column (with �1� equaling �Monday� through �7� equaling �Sunday�) is greater than 1, count the number of days that separate the �Start Date� from the �End Date� plus 1, minus the number of days that separate the �Start Date� from the �End Date� plus 1 divided by 7 and rounded down to the nearest 1 number and multiplied by 2 with 2 subtracted from the result.  If the number of the day of the week in the �End Date� column (with �1� equaling �Monday� through �7� equaling �Sunday�) is less than the number of the day of the week in the �Start Date� column (with �1� equaling �Monday� through �7� equaling �Sunday�), AND the number of the day of the week in the �Start Date� column (with �1� equaling �Monday� through �7� equaling �Sunday�) minus the number of the day of the week in the �End Date� column (with �1� equaling �Monday� through �7� equaling �Sunday�) is not greater than 1, count the number of days that separate the �Start Date� from the �End Date� plus 1, minus the number of days that separate the �Start Date� from the �End Date� plus 1 divided by 7 rounded down to the nearest 1 multiplied by 2, and display the result.

Whew!!!  That was a mouthful (told you it�d be somewhat confusing).

Let�s try and simplify this some to help clear it up.

We know we�re using the �Return_type�  of 2 for each and every �WEEKDAY� function (resulting in �Monday� equaling �1� through �Sunday� equaling �7), so we can skip mentioning it each time in the paragraph.

We also know what our question is, so we don�t have to repeat it in the �FALSE� side of the �IF�.

Since we also now know how the �WEEKDAY�, �DATEDIF�, and �FLOOR� functions work, we don�t need to expand each of them out, so we�ll just replace the long-explanation of each one with their actual formula instead.

Stripping out each of these three pieces should make it clearer to understand (no guarantees at this point).

Top Blogger Web Part � No code required

Note: Toni has updated the web parts below. He’s also included a Spanish version.

Laura Rogers posted an interesting business requirement at Stump the Panel of End User SharePoint:

Here’s a question that came in from jlschu1:
I am trying to create a web part on a SP blog site that will display the top bloggers for that site. There is a large group of people writing posts on one blog site, in one list of posts. I want to show the top bloggers based on their number of posts.

Laura solved the problem with SPD workflow which sounds interesting. Laura, I can’t wait to see it.

I took a different path and created a "non-code� required web part to solve this. This web part is similar to my Blog Posts Archive web part.

I made two flavors: tag cloud and a simple list. See figure below.

Top Blogger Web Part

To deploy, simply upload these to your SharePoint web part library. This is a "no code� solution and you do not need console access to your server.

You can use these on any site based on the default blog site template (English). In case you have a site in some other language, drop me a line.

In future articles I’ll cover how to build these step-by-step.

Toni FrankolaAuthor: Toni Frankola SharePoint Use Cases Toni started his Web adventure in late 90�s and has been working with various web technologies ever since.

Toni is leading project engagements and managing a team of consultants specializing in Microsoft technologies. His primary focus is on Microsoft Office SharePoint and Dynamics CRM. He works at Perpetuum Mobile, a Microsoft Gold Partner from Croatia.

Live Online Workshop – Data View Web Part Solutions: Part 2

Next Tuesday, June 2 at 1:00pm EST, Laura Rogers will be leading the second live online workshop, showing how to use the data view web part to build data driven, SharePoint solutions. This is a hands on session where you will implement the solutions in your own, SharePoint sandbox.

In the screencast below, Laura presents three topics for the workshop and asks you, the reader, to pick your favorite. Please leave a comment to let us know.

Choose from:
1. Customized Task List in a Data View Web Part
2. Feedback Form in a Data View Web Part
3. RSS Feed in a Data View Web Part

embed this screencast on your site

Laura RogersAuthor: Laura Rogers, Birmingham, AL

Laura Rogers is currently a SharePoint Administrator at HealthSouth Corporation in Birmingham, Alabama. She has ten years of experience with Microsoft’s messaging and collaboration systems. This includes four years in SharePoint implementation, training, and customization. Laura has been a MCSE since 1999, with her most recent certifications being MCSE 2003 + Messaging, MCTS in MOSS and MCTS in WSS 3.0 Configuration. She also wrote a chapter in the Microsoft Office SharePoint Server 2007 Administrator’s Companion by Bill English.

24 Minute Screencast: SharePoint Designer Workflow, Part 6 of 5

Does this guy ever sleep? This is the sixth screencast in a five part series on SharePoint Designer Workflow, produced by Bj�rn’s of the USP Journal. Yes, that’s right… the 6th in a 5 part series. Go figure.


(Insert Screencast).

           

If you have seen previous issues of the journal, you know how well it’s done and you might want to just go directly to Bjorn’s site and purchase the issue, Number 4 on SharePoint Designer Workflow.

For those who haven’t had the pleasure of reading the USP Journal, sign up for the EndUserSharePoint.com Weekly Newsletter and download the free chapters. When you decide it’s time to buy, Bjorn is throwing in a few perks with Issue 4, exclusively for EndUserSharePoint.com readers:

  1. PDF of Understanding SharePoint Journal, issue 4
  2. 10 exercise videos of issue 4
  3. 5 web casts from the Web cast series on SharePoint Designer workflows
  4. All videos in both WMV and iPod-friendly MP4 format

Sound good? Great! Here’s the link for purchasing Issue 4: SharePoint Designer Workflow. Get to it! It’s time to get your hands dirty with SPD.

Taming the Elusive �Calculated Column� – Date and Time – Part 1

Overview

I wanted to start off the series on the �Date and Time� set of functions by examining a specific problem that many folks have posted questions about � that is, how do you calculate the difference (number of days) between two dates, while excluding weekends? (Iain on the STP forums asked this recently, which sparked my interest in writing this)

At first glance, this seems like an obvious candidate for the �DATEDIF� function since by definition, it �Calculates the number of days, months, or years between two dates�.  The problem with this approach however, is that by itself, it will count all days, including those specific ones we don�t want (weekends).
If, on the other hand, we were just working in Excel, we could take advantage of �NETWORKDAYS� since it will return the number of �whole� workdays between two dates, but alas, we don�t have that one available within SharePoint*

*One of my most wanted features of SharePoint version-next (or next): make list functionality exactly the same as Excel spreadsheets.  If you�re going to bother to model them after spreadsheets by including functions and abilities to perform calculations, you might as well go all the way and transform them into real working sheets.  This to me screams �Office Live�!!  We already have the ability to export to a spreadsheet with a data connection, so how about extending this a bit further by adding in the ability of exporting a spreadsheet built in Excel to a new list?  Imagine creating the functionality you want within Excel, using all the power that comes with it, then choosing �Export to new SharePoint List� where it asks you to enter in the site address (or choose from a list of available connections), the name of the list, then �Export��and done.  You�d now have a new list based on your spreadsheet with the benefit of already having an active data connection setup so you can administer the list either through the list itself, or through the original spreadsheet.  Any new columns, calculations (using the full-range of what�s available in Excel), or updates would be saved to both � in real time.  Imagine the possibilities�

Since we can�t perform the �exact� same calculations we could otherwise do in Excel, we need to recreate the functionality performed in such a manner that can be compatible with SharePoint.

Let�s take a look at the formula that will accomplish this for us then examine it to see how its logic performs the date calculations.

Web Parts: How would I know if available in WSS or Enterprise?

I’m posting a request that came in this morning in hopes that I won’t be the one that creates the chart to answer the question. Can you point us to a resource that lists ALL available web parts, no third parties please, and tells which version of SharePoint in which they are available?

I would post that one on the wall if it looked really nice! Here’s the original request:

"Could you please develop a list that shows the web parts and whether or not you have to have the following for each:
– Web Part Requires Enterprise Edition
– Web Part Requires SharePoint Designer

"I waste SO much time reading about something — starting to form SOME knowledge only to have it dashed because I eventually find out it can’t be used since we don’t have Enterprise edition. Or SPD. Or Both.

"I would love to have some symbol or a footnote or something on every article that gives me a clue. I just read something about Data View Web Part. Sounds VERY interesting but since I don’t see it in my web part list, I think it’s only available with Enterprise edition. Can I find that stated CLEARLY? Nope. I even contacted my 2nd level support and got asked ‘is that a 3rd party web part???’

"See why we need that level of help!
Signed …. one frustrated SP person."