Quite often, I'm being asked to provide an option for cascading drop-down lists that also filter based on the selections made by the user on the previous drop-down list. A few examples when this could be asked are filtering countries based on region selected, filtering schools based on district, filtering departments based on divisions, filtering parts based on model vehicle, and many more.

I'm going to give an example for region and country. You can replace this with any other options that fit your needs.

You are going to need the following:

- 2 custom lists (one of the region and another one for the country)
- Document library or list that will use the 2 custom lists mentioned in the bullet above
- Document library where to save your code to
- jQuery (you can download it from here: http://docs.jquery.com/Downloading_jQuery)
- SPSServices jQuery (you can download it from here: http://spservices.codeplex.com/releases)

I managed to make it work using jquery-1.8.1.min and jquery.SPServices-0.7.1a.min. You may want to try other versions if it doesn't work for you. Sometimes it's a bit of trial and error, like with many SharePoint things.

1. Download the two files and upload them to a document library in SharePoint of your choice and to which you have permissions over in the site;

2. Create the first custom list. In the example, I'm going to name it lookupRegion. Then I'm going to modify some settings, such as removing the ability to attach files, as well as adding a description ("This is the region name") and enforcing unique values for the Title column. Then I'm going to add a few values in there:
3. Create the second custom list. In the example, I'm going to name it lookupCountry. Then I'm going to remove the ability of attaching files (in the list settings) and then I'm goint to make some changes to the Title column, as well as create a second column, as follows,

Title: Add a description ("This is the country name") and enforce unique values;
Region: Create a region column; this column is a lookup column to the Title field in the lookupRegion custom list and it is a required column (you want to make sure that a region is provided).

4. Add a few values in this list:
5. I will now create a Regional Files document library (you can create a list if not) and I will create one column named Region (lookup column to the lookupRegion list Title column) and another column named Country (lookup to the lookupCountry Title column.)
6. Using Notepad, create a file and type in the following:

<script language="javascript" src=" /URL_to_your_code_location_on_your_SharePoint_site/jquery-1.8.1.min.js"></script>

<script language="javascript" src=" /URL_to_your_code_location_on_your_SharePoint_site/jquery.SPServices-0.7.1a.min.js"></script>
<script language="javascript" >

$(document).ready(function() {
$().SPServices.SPCascadeDropdowns({
relationshipList: "lookupCountry",
relationshipListParentColumn: "Region",
relationshipListChildColumn: "Title",
parentColumn: "Region",
childColumn: "Country",
debug: true
});

});
</script>

Note: Replace the text in blue above with the URL to the location of your files on your SharePoint site. I prefer to use absolute URLs.

7. Save the file under the name of cascadingdropdown.js (this is very important).

8. Upload this file to the same library where you saved your other jQuery files, or to any other library of your choice.

9. Go back to the Regional Files document library and select Default Edit Form from the Form Web Parts icon in the Customize Library section of the ribbon.
10. Insert a Content Editor Web Part to the page. Edit the web part, give it a meaningful name, remove the chrome, and select hidden in the Layout section. Then reference to the cascadingdropdown.js file (in the Content Link section of the tool pane.) Apply your changes and save ([OK]) the web part. Save and close the page.

11. Upload a file and see if it works. The image below shows that it works for me.
Some last explanations about the parameters used:

relationshipList: This is the name of the list where we have kept the relationship (in our example, lookupCountry);
relationshipListParentColumn: This is the parent column (Region) in the relationship list (lookupCountry);
relationshipListChildColumn: This is the child column (Title) in the relationship list (lookupCountry);
parentColumn: This is the parent column (Region) in the library (or list) where we want to implement this (Regional Files);
childColumn: This is the child column (Country) in the library (or list) where we want to implement this (Regional Files).
 
One request we frequently receive is to allow to colour events in a Calendar list for easier finding and viewing. Path to SharePoint offers a script that you may want to check. And that's basically what I did; didn't feel like reinventing the wheel. So go here and follow the instructions. If you have any questions about the original site, contact Christophe@PathToSharePoint.com

But before you start, make sure you have the following:

- Calendar list ready to be used
- A choice column of your preference, which will be use to categorize the events on your Calendar list
- A displayed column already designated (for example, Title)
- A separate Colour column (calculated value)
- Another calculated value column (for example, ColouredEvent)

Follow the instructions on that site and you should be all set. If you have any doubts, I can assure you we were able to successfully implement this solution on SharePoint 2010.

It might get a little bit tricky when you have to create the view that will display the colour-coded events. If you don't pick the right columns, it won't work. Find below a sample image of how the Calendar view should be set up.



The final thing you will need is to reference the script from the page where you are displaying the coloured view of the Calendar list. To do so, upload the script to a document library, go back to the page where your calendar view displays, edit it to insert a Content Editor Web Part (CEWP), and reference the script file from the CEWP). Save and publish the page. It should work.
 
We once had a situation where users would forget to check in files after checking them out from a document library. So someone came with the idea of creating an "annoying" pop-up to remind the users to check the files back in once they were done using them. This is the result of that idea.

1. Edit the page

2. Add a Content Editor Web Part

3. Edit the Contend Editor web part properties, remove the chrome, and make any other changes as desired, rename the web part to something more meaningful than 'Content Editor,' (for example, 'Pop Up'), and then [Apply] and [OK]

4. Select Click here to add new comment at the Content Editor Web Part

5. Locate the HTML icon within the Markup section of the ribbon, select it, and then select Edit HTML Source

6. Type in or copy and paste the code below in the HTML Source web page dialog

    <script type='"text/javascript"'>
        <alert("Alert Message Here")
    </script>

7. Select [OK] and save the page (and publish if publishing is turned on for your site)

Note: Replace the Alert Message Here text with the appropriate message that you wish to  convey.