Jul 29, 2010

No two choices should have the same ID at Microsoft.SharePoint.ApplicationPages.ChoiceComparerWithDefaultGroup.Compare

You probably get this error when you try to add an existing site column to a site content type.

The reason is that two site columns have the same internal name.

1. Check if the same error occurs at the root site when adding an existing site column to a site content type.

2. Once you've determined at which level the site column conflict is occurring, crack open your handy-dandy Sharepoint Manager 2007 (http://spm.codeplex.com).

3. Navigate to the fields (site columns) defined for that site and you'll probably see an additional field that doesn't show via the normal site columns page (_layouts/mngfield.aspx). This field is your problem field because its internal name matches the internal name of an inherited field.

4. Check that this field is not used in any site content types or lists. You may have to remove it from them first.

5. Delete the field with Sharepoint Manager 2007.


Jul 7, 2010

Custom list forms and data views

If you create a custom form for displaying or editing a list item, you won't be able to view the author or editor fields except in the Sharepoint:CreatedModifiedInfo control.

This is because the SPDataSource created uses the ListItem mode which hides certain fields. If you change the mode to List, you'll get all the fields.

Keep in mind you'll have to add a parameter ItemId to your selectcommand for the SPDatasource and correct the view CAML accordingly.

Sharepoint filter logic order

As you've discovered, the filter logic for Sharepoint 2007 list views has no grouping operator unless you convert the list view into a Data View Web Part.

That said, you can possibly use the evaluation order of the filter rules to achieve your grouping.

The order is: (((filter1 and/or filter2) and/or filter3) and/or filter4) and so on.