Showing posts with label SharePoint Limitations. Show all posts
Showing posts with label SharePoint Limitations. Show all posts

Friday, September 11, 2009

Solved: Can't Group By Choice Column in SharePoint List View

By Default, items in a SharePoint list can't be grouped by a Choice field if it allows multiple selections (checkbox).

To be able to group by the value of a Choice field in a SharePoint list or library which allows multiple selections, you need to ensure that the Choice field/column is set as Radio Buttons or a Drop Down Menu. Both of these options only allow a single selection of the available choices, which is required to allow grouping by the column/field using Standard SharePoint List views.

To group by a Choice field which allows multiple selections (checkboxes), convert the Web Part to a Data View using SharePoint Designer, then apply grouping doing the following:

1. From the "Common Data View Tasks" menu for the Data View Web Part, select "Sort and Group:" from the options to open the Sort and Group Dialog, add any field into the Sort Order section to activate the "Edit Sort Expression..." button. Click the "Edit Sort Expression..." button to open the Advanced Sort Dialog.

2. From the list of fields, add the Choice field, and make sure that the field reference is the only value in the "Edit the XPath expression" input.
The field reference should begin with an @ symbol followed by the internal name
of the SharePoint column/field (example: @Location). The value from the
selected column will display in the Preview box if items in the list/library
match the specified criteria, which in this case is a simple column/field value
(no conditions or calculations required).

3. Press OK on to close the Advanced Sort Dialog. Select the Choice Field from the list of fields in the "Sort Order:" box, then select "Show Group Header" under Group Properties. This will result in items being grouped by the value in the choice field which allows multiple selections.

Thursday, June 18, 2009

Access Denied when trying to upload multiple files to a SharePoint Library

Problem: Access Denied page when uploading files using SharePoint's multiple file upload interface. No details are displayed when the upload fails except the Access Denied page.


In my case, this was not related to permission on the site or document library as the Access Denied page suggests. After uploading one of the files using the single file upload interface, an illegal character message displayed. Once the illegal character was removed, bother the single and multiple file upload interfaces were able to upload the file(s) successfully. For more information about illegal/unsupported characters in SharePoint document libraries see Illegal Characters in SharePoint Document Libraries.


If a large number of files are being uploaded or migrated into SharePoint, there may be many with filenames containing illegal characters. File rename utilities allow conditional renaming of files to remove or replace characters and strings. See Bulk File Rename files to remove or replace illegal characters - allow upload/migration to SharePoint Document Library.

Illegal Characters in SharePoint Document Libraries

The following characters are unsupported / illegal in SharePoint document libraries:

& " : * ? <> # {} % ~ / \ Tab

If the file name of a document contains any of the characters above, a message will be displayed noting SharePoint's illegal characters. If using the multiple upload interface, the response will be an Access Denied page. See
Access Denied when trying to upload multiple files to a SharePoint Library.

For details about bulk file renaming if a large number of files and documents contain illegal characters, see
Bulk File Rename files to remove or replace illegal characters - allow upload/migration to SharePoint Document Library.

Bulk File Rename files to remove or replace illegal characters - allow upload/migration to SharePoint Document Library

SharePoint document libraries can not store files if illegal characters exist in the file name (Illegal Characters in SharePoint (MOSS 2007) ). Migrating/uploading a large number of documents and files to a SharePoint document library can become tedious if you have to rename each file containing illegal characters each time the copy fails (or delayed write error).

To save a time and effort when migrating a large number of files, freeware bulk file renaming utilities are available which allow conditional renaming of files in a directory any sub directories.

The software I used to bulk rename files to remove unsupported characters prior to migrating to SharePoint was the PFrank File Renamer, written by Peter Frankenberger. PFrank allows a series of conditions and rename actions to be performed on each file in a specified directory and any sub directories to remove or replace characters or strings from filenames. The most common is the "&" (ampersand) character, which I replaced with a space then "and" and another space. I then created a condition to replace any remaining double spaces before and after the word "and".

Once all files have been processed by the file rename utility, any illegal characters will be replaced or removed to allow a successful migration into a SharePoint document library.

When using SharePoint's Multiple File Upload interface, file names don't seem to be validated prior to the upload. If any file has an illegal character in the file name is an Access Denied page. See Access Denied when trying to upload multiple files to a SharePoint Library for more information.