I’ll let the participants tell you about it. This area is for comments from the people who attended the event.
We will definitely be running this one again in the near future.
]]>Tristan asked in another post: “When a calendar event is being created, I want the end date/time to automatically populate to 1.5 hours after the start date/time. Seems simple, but haven’t found a formula for this yet.“
Sounds like a pretty reasonable suggestion and the Calendar lists NewForm.asx already sets the Start time to the current time – shouldn’t be too hard, right?…
You can use formula like (1/24th of a day or 1 hour to the rest of us is 0.04167!)
=[Created]+0.04167
But we can’t use the Created/Modified field in the formula for a new record because it doesn’t exist yet.
OK, so what if we try and use this in the Default Value column as
=Today+0.04167
This will always be ‘Today at 1AM’ rather than ‘Today in exactly 1 hour’ as Today uses 12:00 AM as the time offset. Unfortunately there is no [Now] function in SharePoint.
Its a moot point though as we can’t edit the default value of the Start and End times in a Calendar list anyway.
FAIL! On to Attempt #2…
When adding a new record to the Calendar SharePoint uses NewForm.aspx so what about modifying that?
We could use SharePoint Designer to customize NewForm.aspx but its quite complex, lots of people don’t like using it and its fraught with potential problems. Sure it gives us much more power but for our purposes its overkill so we are going to get a little hacky. As it turns out its not the cheerleader who’s going to save the World - its jQuery!
(Tip – if you want to put instructions on your form this is an ideal way to do it – select Rich Text Editor)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | <script type="text/javascript" src="<A href="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js</A>"> </script> <script type="text/javascript"> // Set the hours to add - can be over 24 var hoursToAdd = 1; // Mins must be 0 or div by 5, e.g. 0, 5, 10, 15 ... var minutesToAdd = 30; // JavaScript assumes dates in US format (MM/DD/YYYY) // Set to true to use dates in format DD/MM/YYYY var bUseDDMMYYYYformat = false; $(function() { // Find the start and end time/minutes dropdowns by first finding the // labels then using the for attribute to find the id's // NOTE - You will have to change this if your form uses non-standard // labels and/or non-english language packs var cboStartHours = $("#" + $("label:contains('Start Time Hours')").attr("for")); var cboEndHours = $("#" + $("label:contains('End Time Hours')").attr("for")); var cboEndMinutes = $("#" + $("label:contains('End Time Minutes')").attr("for")); // Set Hour var endHour = cboStartHours.attr("selectedIndex") + hoursToAdd; cboEndHours.attr("selectedIndex",endHour % 24); // If we have gone over the end of a day then change date if ((endHour / 24)>=1) { var txtEndDate = $("input[title='End Time']"); var dtEndDate = dtParseDate(txtEndDate.val()); if (!isNaN(dtEndDate)) { dtEndDate.setDate( dtEndDate.getDate() + (endHour / 24)); txtEndDate.val(formatDate(dtEndDate)); } } // Setting minutes is easy! cboEndMinutes.val(minutesToAdd); }); // Some utility functions for parsing and formatting - could use a library // such as www.datejs.com instead of this function dtParseDate(sDate) { if (bUseDDMMYYYYformat) { var A = sDate.split(/[\\\/]/); A = [A[1],A[0],A[2]]; return new Date(A.join('/')); } else return new Date(sDate); } function formatDate(dtDate) { if (bUseDDMMYYYYformat) return dtDate.getDate() + "/" + dtDate.getMonth()+1 + "/" + dtDate.getFullYear(); else return dtDate.getMonth()+1 + "/" + dtDate.getDate() + "/" + dtDate.getFullYear(); } </script> |
A few notes
Ryan Wheeler worked as an as a developer for an IT consultancy in London, England, for a number of years before leaving his "real job" to set up Pentalogic Technology in 2005. Ryan had experimented with early versions of SharePoint in his consultancy work, and saw the potential for creating add-ons and web parts to enhance SharePoint
]]>In this 2 minute demo, we show a tweak to the SharePoint calendar interface that allows users to switch between week and month views without reloading the page. Everything shown in the demo is contained within Content Editor Web Parts (CEWP) and can be done with Site Manager permissions.
Download the screencast: Killer Calendars Demo
File Size: 2.7 megs
Participants in the live online workshop will receive all of the web parts needed to run the solutions on their own site, their own SharePoint sandbox to test out the solutions and will have access to a Q&A forum on Stump the Panel with Christophe as moderator.
We look forward to seeing you there: Killer Calendars in SharePoint
]]>A challenge with SharePoint for site managers, site administrators, or site owners is understanding their own role, it’s responsibilities, and what expectations come with being a ‘site owner, manager, or administrator’.
Before I go into what you can do from a Governance perspective, and related challenges I would like to use a quote from Mark Miller (from this article on user adoption and the success of this site ) that I think perfectly summarizes the ‘job’ of a site manager.
“Your job as a site manager isn’t to provide all the content for your site. Your job is to take care of and nurture those that will.” – Mark Miller
This is coming from a strong user adoption and cultivating contribution perspective but it’s a very important point. A site owner, administrator or manager (you pick the name) has a lot of extra responsibility that takes a lot of time and energy. They are often also the primary person who coordinates, supports, and evangelizes the site’s use. For the sake of consistency let’s use the “site manager” title for the rest of this article.
Holy smokes! That’s a lot of stuff, and we have barely started. It’s no wonder SharePoint can be really overwhelming for people. Not only are they often responsible for their normal work but now they might be taking on a whole bunch of other responsibilities. So how do you make it easier for them? You can make it easier through effective planning and governance as well as communication.
There is a lot I could go on about here but instead I am going to try and cover some high level important points to try and provide direction.
It’s not as simple as saying ‘Site Managers’ will manage your sites, or the SharePoint support team(s) will manage our sites (forgot to mention site managers are part of the SharePoint support groups.. but that’s a longer story). You need to think about the different types of sites you have, their objectives, purposes, and audiences then you can get an idea of what out of the above lists (and more) the Site Manager or Site Managers will be responsible for.
You might even need an entire Site Management team. Considering the incredible number of possible responsibilities, tasks, and areas of focus a Site Manager may need to work with. This can often greatly help and also increases ‘ownership’ and a feeling of commitment to a site from many people. (Team mentality and ‘team ownership’ can be a really good thing).
One thing that is very important to think about when selecting site managers, training site managers, or thinking about the expectations and governance around them is the scope/size, growth, and longevity of their site. This is often based on the ‘classification’ of the site they own or manage.
Example: If the site is very large, with many contributors and has a large number of access requests on a constant basis then you will certainly want to consider a team of site managers rather than just one person, as well as backup site managers (especially if it’s a critical area, or requires high availability), etc. I have even seen organizations that have SLA like agreements that the Site Managers sign off on. At the same time simply providing some ‘rules of engagement’, supporting resources or expectations of use can help provide clarity around the topics mentioned in this article.
There are patterns to site usage and what people do with certain ‘classifications’ of sites (defined by the Governance teams). Think about these common actions and focus on them first. Make sure you give the list of actions and expected responses to your site managers and how they can perform these tasks. It’s always better to have consistency when possible for how users engage site resources.
If you consider the number of challenges a typical user faces, the easier, more consistent, and natural you can make the process/procedure the better it will be. Remember you don’t have to plan for everything here. Realistically that would be impossible, so put your time and energy into outlining the most popular actions, and most requested ones first.
There are numerous challenges you experience around assignment of site managers. Sometimes it can be very hard to find the ‘right kind’ of ‘super user’ or a person that can fufill many of the expectations I outlined earlier. Keep in mind a ‘site owner’ or someone who approves and is the representative for the site may not be the same person as the Site Manager (if desired). Someone with technical skill who is a bit more ‘savvy’ may be a better person to give many of the Site Management responsibilities too, while contact, co-ordination, and other activities might be run by a different site owner (or even site ‘secretary’).
Sometimes a site’s scope may be very limited or small so it can seem difficult assigning a site manager. It is still very important to do this though as it ensures someone owns management of the area. Often a site manager can manage multiple sites if they are smaller/simpler as well.
Due to site sprawl it’s good to have points in the expectations stating that the site manager is in charge for any subsites unless otherwise stated. This helps clarify responsibility and again promotes a sense of ownership, control, and clarity for end users.
When planning anything around people it’s important to recognize that you need a succession strategy around the role. There should be a pre-defined (if possible) process for abdicating responsibility of the site management tasks, and should never be a site without a site manager.
The Site Manager doesn’t have to be the biggest contributor, or the most active person on the site. Often they might be, but this is certainly not a necessity. That being said if they are the owner or representative of the site it IS important to lead by example where possible.
So I think I have rambled on long enough now about Site Managers and many of the things they might do. Now I have two questions for anyone who reads this article:
What do you do as a Site Manager?
What did I miss in this article?
Hope this helps,
Richard Harbridge
Guest Author: Richard Harbridge
http://www.linkedin.com/rharbridge
Richard Harbridge is a really big geek in the GTA (Toronto, Ontario, Canada area) who is passionate about technology, communication, social media, psychology, personal growth/development and business (as well as about a million other things). Richard has worked extensively with SharePoint (multiple versions) working as a Lead Developer, Consultant, Administrator, Business Analyst, Project Manager, Quality Assurance Lead, Trainer and pretty much every other role imaginable.
Richard has a bunch of SharePoint Certifications and Achievements (MCTS Config WSS and MOSS, MCTS Development WSS and MOSS, BVPS), a bunch of business awards, and some other unrelated ones.
]]>
I was working on a mileage reimbursement project that required a user to associate travel mileage with a specific date. To make things easy for the user, I wanted to use a Calendar list so they could easily choose a travel date. That would also give me built-in date validation and makes things easier all around.
But, there were some things I didn’t need: Recurrence, Workspace, End Time, or times in general. I wanted the functionality of an All Day Event so that specific times were not necessary. And I only wanted one date associated with the mileage entry.
So, I hid the End Time and set up a workflow to copy the Start Time into the End Time on create. Since it defaults to [Today], its “requiredness” is satisfied by default.
I also wanted Recurrence and Workspace hidden, as well as the time portion of Start Time. And I needed the All Day Event to be checked automatically, and then hidden so it couldn’t be unchecked.
jQuery to the rescue again.
1 2 3 4 5 6 7 8 9 10 11 | <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> $(function() { $('td.ms-dttimeinput').hide(); //hides the times on Start Time $('span[title=All Day Event] > input').attr("checked","checked"); // checks All Day Event //hide all of the check-boxes I don’t need $('tr:has(span[title=Recurrence])').not('tr:has(tr)').hide(); $('tr:has(span[title=All Day Event])').not('tr:has(tr)').hide(); $('tr:has(span[title=Workspace])').not('tr:has(tr)').hide(); }); </script> |
You’ll need to do something similar to your EditForm.aspx:
DispForm.aspx will be slightly different because the HTML is different:
1 2 3 4 5 6 7 8 9 | <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> $(function() { //hide all of the check-boxes I don’t need $('tr:has(td[id=SPFieldAllDayEvent])').not('tr:has(tr)').hide(); $('tr:has(td[id=SPFieldRecurrence])').not('tr:has(tr)').hide(); $('tr:has(td[id=SPFieldCrossProjectLink])').not('tr:has(tr)').hide(); }); </script> |
This solution does leave 12:00 AM on the Start Time (on DispForm only) so I’d love to see a solution for removing that as well.
]]><object width="526" height="376"> <param name="movie" value="http://content.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Workshop%20Demos/media/905b9690-400b-4631-a666-bee7efb6be6a/flvplayer.swf"></param> <param name="quality" value="high"></param> <param name="bgcolor" value="#FFFFFF"></param> <param name="flashVars" value="thumb=http://content.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Workshop%20Demos/media/905b9690-400b-4631-a666-bee7efb6be6a/FirstFrame.jpg&containerwidth=526&containerheight=376&content=http://content.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Workshop%20Demos/media/905b9690-400b-4631-a666-bee7efb6be6a/2009-06-12-ReclaimSpace.mp4"></param> <param name="allowFullScreen" value="true"></param> <param name="scale" value="showall"></param> <param name="allowScriptAccess" value="always"></param> <param name="base" value="http://content.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Workshop%20Demos/media/905b9690-400b-4631-a666-bee7efb6be6a/"></param> <embed src="http://content.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Workshop%20Demos/media/905b9690-400b-4631-a666-bee7efb6be6a/flvplayer.swf" quality="high" bgcolor="#FFFFFF" width="526" height="376" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Workshop%20Demos/media/905b9690-400b-4631-a666-bee7efb6be6a/FirstFrame.jpg&containerwidth=526&containerheight=376&content=http://content.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Workshop%20Demos/media/905b9690-400b-4631-a666-bee7efb6be6a/2009-06-12-ReclaimSpace.mp4" allowFullScreen="true" base="http://content.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Workshop%20Demos/media/905b9690-400b-4631-a666-bee7efb6be6a/" scale="showall"></embed> </object>
If you like what you see, please consider registering for the workshop.
If the solution looks useful, please join us for the online workshop this Friday at 1:00pm EST.
<object width="526" height="418"> <param name="movie" value="http://content.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Workshop%20Demos/media/980ade5d-d961-40fa-9d3f-d24727dcdc36/flvplayer.swf"></param> <param name="quality" value="high"></param> <param name="bgcolor" value="#FFFFFF"></param> <param name="flashVars" value="thumb=http://content.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Workshop%20Demos/media/980ade5d-d961-40fa-9d3f-d24727dcdc36/FirstFrame.jpg&containerwidth=526&containerheight=418&content=http://content.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Workshop%20Demos/media/980ade5d-d961-40fa-9d3f-d24727dcdc36/2009-06-12-MasterCalendar.mp4"></param> <param name="allowFullScreen" value="true"></param> <param name="scale" value="showall"></param> <param name="allowScriptAccess" value="always"></param> <param name="base" value="http://content.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Workshop%20Demos/media/980ade5d-d961-40fa-9d3f-d24727dcdc36/"></param> <embed src="http://content.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Workshop%20Demos/media/980ade5d-d961-40fa-9d3f-d24727dcdc36/flvplayer.swf" quality="high" bgcolor="#FFFFFF" width="526" height="418" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Workshop%20Demos/media/980ade5d-d961-40fa-9d3f-d24727dcdc36/FirstFrame.jpg&containerwidth=526&containerheight=418&content=http://content.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Workshop%20Demos/media/980ade5d-d961-40fa-9d3f-d24727dcdc36/2009-06-12-MasterCalendar.mp4" allowFullScreen="true" base="http://content.screencast.com/users/EndUserSharePoint/folders/SharePoint%20-%20Workshop%20Demos/media/980ade5d-d961-40fa-9d3f-d24727dcdc36/" scale="showall"></embed> </object>
]]>“Our Superintendent wanted a calendar that would enable employees to post certain events on their subsite calendars which would appear on the home page calendar. We implemented [Mark's] solution, and are very happy with our new master calendar.” [Ted]
“My first workshop and it was well worth it. I was hesitant to participate due to my lack of Developer or coding skill but everything was clear, easy to understand and follow.” [Linda]
“I have attended many other sharepoint workshops/webinars and by far this was the best. I think what sealed the deal for me was the hands on interaction and being able to walk step by step thru the process on my own site.” [Dave]
Guest Author: Niamh Kenny, London United Kingdom
Niamh is a SharePoint Administrator at Camden & Islington Foundation Trust, London. She has five years of experience working with Microsoft Sharepoint, this includes implementation, training, and customisation.
I have a team site with a Tasks list where all the tasks assigned to the IT Projects Team are kept. They needed a way to report on their tasks etc in a more visual style than the out-of-the-box views!
First I connected the task list to Visio as per diagram below which was great as it gave a really good look to the tasks list and outstanding items.
I use your site a lot to get insights/ideas for quick and easy (generally) solutions to problems or ideas I have had. I also use my test environment to test out and show to end users/managers for approval prior to posting live. I have been following the JQuery sessions for a while. I thought it would be great to have a Pie Chart visually representing the task list, initially for outstanding items with the provision that it could be extended for all types of views, depending on what information the team is either likely to need or want.
So I created the view in the task list, using a calculated column that gave a single line of text that counted either the number of days overdue, how many days were left or whether the task was completed or not and entered that information. I also made this column count how many of each there were.
I had already found the post http://www.endusersharepoint.com/?p=1537 then created a new page and added the task list as a web part then added the content editor web part including the code for the pie chart. I had previously downloaded the JQuery file from the links and have added that to my top-level site collection that all subsequent sites have access to and can reference.
The final result for this page is here (I haven’t hidden the web-part yet as I think it’s quite good for people to be able to see the actual data too but that may change depending on user requirements).
I am currently trying to get the multiple charts to work on another page, but am still creating views etc on the task list for that to work.
I have created a Preview Pane for a Calendar using another JQuery from your site and that has gone down as a treat with users as well. (And took all of 5 minutes too)
A SharePoint Master Calendar is created with multiple content types for filtering specific types of events. When that type of event is needed within another site, LyteBox is used to display those events as a stand-alone calendar. This solution can be used to push information to locations outside the original site and site collection, if needed.
Check out the screencasts and I hope to see you next Tuesday.
“This is an excellent workshop. Mark answered every question and moderated with humor and patience through the usual communication hiccups with an audience that is international (Argentina, Ireland, all over the US).” — Betsy [SharePoint Dashboards, Online]
“This workshop was absolutely worth the time and money. I learned alot and will be able to easily transfer it to my daily work. I can’t wait to impress my coworkers.” — Tammy [SharePoint Dashboards, Online]
“Don’t waste anymore time reading this to check out if it was worth it – stop reading and book your session!” Mick Brown [SharePoint Dashboards, Online]
“This was one of the best training sessions I have attended. It delivered a lot of powerful information yet was simple to follow and participate in. I can’t wait for the next class!” — Heidi [The Fundamentals of SharePoint Lists and Libraries, Online]
“…very professional work. The workshop format with the hands-on lab made the 3 hour webconferencing event a valuable experience for me.” — Urs [The Fundamentals of SharePoint Lists and Libraries, Online]
“What I got out of it the most was by far the use of Task Lists, that was exceptional ! I had no idea that they could be that useful. I’m planning on importing many of my spreadsheets into the site, including our business plan.” — Erik [The Fundamentals of SharePoint Lists and Libraries, Online]
To add approval functionality like this (which is beyond the scope of this article), you’ll want to create a new table that has the names of your date types along with other fields you will need for a workflow, like this:
A list will allow you to associate other information with your date type, for example, to use in a Workflow
Once you’ve created the list of date types, you can then add a Lookup column to your calendar so your users can choose from your list and your workflow can handle any back-end processing that needs to occur for your specific business needs.
Absence Type is getting its information from the new list by the same name
"Houston, we have a problem…"
When it comes to color-coded calendars, we run into a problem with this method. Now that our date type is a Lookup column, SharePoint won’t let us include it in our color calculations.
Lookup columns are not supported in formulas
We have a couple of options:
For the purpose of this article, we are going to explore the second option, which will still involve using SharePoint Designer.
Let’s start by adding two fields to our Absence Type list: Color and BGColor. Both should be a single line of text with a max length (optionally) of 7. We’re going to be storing our hexadecimal values here.
We will need to make some changes to our calendar columns as well. Color and BGColor will no longer be calculate fields. We can’t change them to the column type we want so we have to delete the existing ones and re-create them the way we want them.
Notice we’ve added two extra fields: Absence Title and OldDateType. Go ahead and add these, each as a Single line of text. We’ll need these when we get to our workflow.
It would be confusing to the user for us show these fields on our edit and display forms, so let’s hide them.
In our example, we don’t need Location, Color, BGColor, Display, Absence Type, or OldDateType to be visible
For simplicity, you can now turn the management of content types off and your hidden columns will remain hidden.
Color and Display columns are hidden, as well as the unused column, Location
Once we’ve entered some dates, we can go to our calendar to see the progress we’ve made so far.
Now we need to get the display information we need from our Absence Type list. We’ll create a workflow using SharePoint Designer to do this.
In SharePoint Designer, open your site by clicking File -> Open Site… from the menu. Once your site is open, you can create a workflow and attach it to your calendar.
The goal here is to have our workflow update our color columns and our Absence Title so that we can use them in our calculated Display column. Since these columns are not "calculated" by SharePoint, they are not automatically updated whenever the Event is updated.
That means our workflow will need to check to see if the Absence Type has changed. If it has, the workflow will need to recalculate our colors for us.
When the item is first created, OldDateType will not be set, so this condition will work both for Create and Change
The way to read this screen from an SQL understanding is to see the top part (Lookup Details) as the SELECT statement, and the bottom part (Find the List Item) as the WHERE clause.
So we would read this:
…as the SQL statement:
SELECT Color FROM Absence Type
WHERE Absence Type.Absence Type = Payroll Calendar.Absence Type
In other words, look at the Absence Type on my current Event. Now, go look that Absence Type (basically our Title column) in my Absence Type table and tell me what is in the Color column.
When you do, you will see a warning that a unique value is not guaranteed.
This is because, in theory, you could have two Absence Types with the same name in your Absence Type list. In practice, though, you won’t because it just wouldn’t make sense to your end user to have two items in the dropdown list that were exactly the same. Which would they choose?
So, it’s safe to go ahead an click Yes
If it seems strange that we are doing the same thing for Absence Title, remember that we cannot use a Lookup column in a calculation formula. By setting the Absence Title equal to the Absence Type, we’re effectively copying the Lookup value to a Single line of text column. We can then use the latter for our formula.
This is where we are recording the current Absence Type. If this Event is changed in the future, the workflow condition we set in Steps 3-9 will check this field to see if the Absence Type has been changed, so that the colors and Absence Title need to be updated.
Now your calendar should have all the pieces in place to keep your color-coded calendar functioning properly.
Note: Since the colors and date type text are being updated by a workflow, the changes to your calendar will not be instantaneous. But wait a couple of seconds and refresh your browser and you should see your changes.
Guest 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 [email protected].