August 15th, 2010 | Categories: JavaScript, SharePoint | Tags: , ,

Alphabetical List View Quick Filter

Staying loyal to JavaScript and CEWP I’ve published a new part in the Power of Content Editor Webpart series.

This time we use calculated field and filtering list view via URL to create a simple alphabetical filter positioned above or below list view:

After that taking this one step further we expand this example to make a configurable script with some (configurable) styling and displaying the selected filter value:

And with configurable styling we could even simply manipulate the look and feel of the filter.

The same script can be used on multiple lists and views without rewriting the code. All because using the linked content file approach (tip 3 on this page). If you’re eager to use the script and not go through the entire article, there is full script almost at the end of the article.

Click here to read the article.

August 7th, 2010 | Categories: SharePoint administration | Tags: ,

Not directly related to SharePoint, but since SP2010 is hosted on Win2008 I’d say this would come in handy to SP admins. I ran into an issue a while ago where the server would become unresponsive after applying Windows updates. It would finish installing updates, and after restart it would just hang in step 3 of 3 or at "Applying computer settings" or "Applying user settings".

Even though at some point when I’d managed to logged in and see my desktop it was impossible to start anything service-based (IIS, SharePoint, Internet Explorer,…)

What did the trick for me? Couple of things, not sure which is THE fix, and I’m adding couple more that I’ve found searching the Web.

1. Reboot into safe mode after applying Windows Updates. This avoids any driver/service conflict issue. After successfully rebooted in safe mode, restart to normal boot.

2. Delete temporary files (to find them, open a "Run" window, type %temp% and press Enter.). This removes the chance of having some legacy corrupt update process file.

3. Check disk space on your system drive – no need for explanation there. Patches can be quite space consuming.

4. If you have IIS (if you have SharePoint, then you do), make a small registry fix to enforce service startup dependancy. Detailed instructions here: http://support.microsoft.com/kb/2004121.

Hopefully one of those "fixes" will work also for you if you’re facing the same problem.

July 29th, 2010 | Categories: SharePoint | Tags: , ,

If you’ve been surprised when opening a DataSheet view in SharePoint by receiving a message like the one below:

The list cannot be displayed in Datasheet view for one or more of the following reasons

(Below also message in Slovene for my Slovene-SharePoint-using-friends)

Seznama ni mogoče prikazati v pogledu podatkovnega lista zaradi teh razlogov

Then you’re missing something. The same as me. The support article from Microsoft (located here) explains that we need to do one of the following:

  1. Don’t use 64-bit Office 2010 or
  2. if you have to use the 64-bit version, download and install the 2007 Office System Driver: Data Connectivity Components

This goes for SharePoint 3.0/2007 and 4.0/2010

July 18th, 2010 | Categories: SharePoint | Tags:

I’ve been involved in some very interesting SharePoint projects lately so I wasn’t taking time to write my blog. Anyway after a while I’m continuing with The Power of CEWP article series. Even though this article is written in SP2007 with minor modifications it could also be applied to SP2010 (but for SP2010 better solutions exist – XSLT without unghosting pages. As always the entire code can be found at the end.

Click here to read the article.

BTW: Thanks to MJM who commented the previous article about GetElementsByClassName function. I took this into consideration and made slight modifications to this function (now it considers also DOM elements that have multiple CSS classes) in this article and also in my JavaScript library.

May 15th, 2010 | Categories: JavaScript, SharePoint | Tags: ,

Next article in line of The Power of Content Editor WebPart series is available. In this one we’ll get to know how to insert a quick search for any list view that has filter-as-you-type functionality.

Yes, demo is still made for SharePoint 2007. This is in one way keeping the theme of the article series together and also in SharePoint 2010 it’s much easier to create this functionality because of XSLT views.

 

If you are in no mood to read through entire article, the complete code can be found at the end.

Click here to read the article.

March 25th, 2010 | Categories: SharePoint | Tags: , ,

If you’re having trouble with editing Office documents from SharePoint in Windows 7 or Vista, here’s one reason and fix:

Reasons (besides Windows7 and Vista):

  1. WebClient service not started
  2. SharePoint domain has dots (.) in the name
  3. Your IE is trying to resolve LAN/Proxy settings

Solution

Important! Part of solution is also modifying your registry. Please if you’re not sure how to modify registry, get help from an expert. I will not assume any responsibility for possible errors that may result from editing your registry. This solution is not done on server, but on every client that has this kind of trouble.

1. Tell your WebClient Service to where to provide your credentials. By default the WebClient service provides credentials only to sites that don’t have dots in url – presuming they’re in your intranet. Any SharePoint site that has dots in url is presumed in Internet for WebClient. Here’s how:

  1. Using registry editor, open the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters
  2. Next create new Multi-String Value (menu Edit –> New –> Multi-String Value)
  3. Name the value AuthForwardServerList
  4. After the key has been created, modify its value (Right click it and select Modify).
  5. Enter full URLs of your SharePoint sites (one per line).
  6. Save and exit registry editor.
  7. If you use Windows Vista, you have to request a special hotfix for this resolution to work.

Detailed instructions and hotfix request available on Microsoft Support site.

2. Start / Restart WebClient Service

  1. Open the "Run" prompt (key combination Start+R)
  2. Type services.msc and press Enter.
  3. Locate WebClient service
  4. Make sure your service startup mode is set to automatic (right click it, select "Properties", and under "General" tab select "Automatic" from the "Startup Type" dropdown"
  5. Start the service or restart it if it’s already running. (restart in any case for step 1 to take effect).

This part is summed from this link (at the end)

UPDATE: Another reason could be auto-detection of proxy if there is none present.

The way to turn this off is in Internet Explorer:

  1. In Tools select Internet options.
  2. Select Connections tab
  3. click Lan settings button
  4. under Automatic configuration clear the Automatically detect settings checkbox.

 

March 15th, 2010 | Categories: JavaScript, SharePoint | Tags: ,

After a while I’ve prepared the third (or second if you count first two as one) article in Power of Content Editor WebPart series. In this article we do something that was already done using JavaScript – we hide SharePoint’s Quick Launch bar. But we do this to learn how this can be achieved. In order to achieve that, we discover the HTML DOM element that can be hidden, next we discover how to hide it and after we master that we also add a toggle link to the top of the page so users can toggle the Quick Launch visibility.

With this part I’ve also improved the navigation between articles of series a bit:

image

and I’ve used my new gadget toy for adding my handwriting to screenshots. If you find my handwriting too unreadable, please let me know so I’ll stick to typed handwriting.

You’re welcome to read the article here, and comments or questions are available with this post.

March 5th, 2010 | Categories: SharePoint, SharePoint Designer | Tags: ,

After I installed SP2 for Office 2007, an annoying issue occurred. All the code started over indenting – meaning that a sub-node was indented 4 tabs into instead of 4 spaces or 1 tab.

image

There is a setting in SPD to fix that. In Tools menu select Page editor options

image

And under Code Formatting decrease the value in Indent property or change to spaces.

image

March 3rd, 2010 | Categories: SharePoint | Tags:

If you’re trying to export data from a SharePoint list to Excel you might get this error message. Possible causes / solutions:

1. Change all Date and Time columns to single line of text and then back to Date and Time. Don’t worry, the data in these columns will be preserved.

2. There is a Microsoft Post-SP1 hotfix available here. It doesn’t fix lists that already have this issue though

3. If you export data to from SharePoint 3.0 / 2007 to Excel 2003 you might be getting this kind of error

4. If you’re exporting multiple choices field to Excel 2003

5. If you rename a Date and Time column this error may occur. Create an additional column and copy-paste values in a DataSheet view from one column to the new one

6. Changing the default date for Date and Time column from "Today" to "None" and then back may resolve the issue

All of the above solutions still didn’t work for me. What did the trick was following:

7. Lookup column points to a calculated field. Changed the lookup column to not point to calculated field but to a Single Line of Text field and the problem went away.

Technorati Tags: ,
March 2nd, 2010 | Categories: SharePoint 2010 | Tags:

If you need to add custom JavaScript to SharePoint 2010 list form just like in 2007 (for example the SharePoint Cascaded Lookup), you’d need to insert the Content Editor WebPart to the same form. There are couple of ways to do it. Here’s one:

1. In a SharePoint List View select the "List" tab in "List Tools" tab group:

image

2. Select "Form Web Parts" and select "Default New Form" or "Default Edit Form".

image

From here on you can add webparts and edit their properties like in any other page.

image