SharePoint Blog - René Hézser

Anmelden  RSS Feed RSS Feed
Startet die Suche

Mar 122009

Issues in WSS V2

Responses to items in an Issue list (SPListIssue) are new version in WSS V3. WSS V2 lacks the ability to use versions for lists. So what did Microsoft do that an Issue list behaves like it is using versions?

In WSS V2 items in a single “thread” all have different ItemIDs. To group them together, all have the same IssueID. This is the ItemID from the original item.

A single issue in WSS V2 could look like this:

image 

In WSS V3 it should look like this:

 image

But how can we move/copy the item from V2 to V3? How is the data stored in the old SharePoint?

WSS V2   WSS v3
ItemID IssueID Data entered Data stored   ItemID Version Data stored
1 1 A A+B+C+D   1 4 D
2 1 B A   1 3 C
3 1 C A+B   1 2 B
4 1 D A+B+C   1 1 A

Versioning in WSS V3

Each new version stores the data, which was entered for that particular version. SharePoint will merge the data from the current version with all previous versions.

Versioning in WSS V2

There was no versioning for lists in WSS V2. So Microsoft decided to add new items for a version, and map versions by an IssueID. The problem is, that they did not aggregate the data entered like they do in WSS V3.

The data entered was “A”. Later it was changed to “B”, “C” and finally “D”. WSS V3 stores the data in the same order as it was entered, and aggregates it for displaying. WSS V2 cycles the data, so it will show for each version the data aggregated from all previous versions. Only the current item (the one which was the first item for the issue) shows the newest data.


Published: 3/12/2009  7:44 PM | 0  Comments | 0  Links to this post
Tagged as: Development, SharePoint, SPField

Jan 022009

SPQuery, ViewFields and empty fields

If you want your query to return empty columns, you have to add Nullable='TRUE' to the viewfields.

<FieldRef Name='Field1' Nullable='TRUE'/>

If you do not add the Nullable attribute, accessing the results of the query like this:

oListItemAvailable["Field1"] will give an Exception.

I’ve made posted a comment about this on the page in the MSDN http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spquery.viewfields.aspx


Published: 1/2/2009  10:55 AM | 0  Comments | 0  Links to this post
Tagged as: Development, SharePoint, SPField, SPQuery

Dec 032008

Supported field types as source for Lookup Fields

Lookup fields are great. They can show information from other lists. I have never noticed before, that the only two supported field types for lookups are SPFieldText and SPFieldCalculated.

All other field types can not be used as source for lookup fields.


Published: 12/3/2008  2:00 PM | 0  Comments | 0  Links to this post
Tagged as: Development, SharePoint, SPField

Oct 222008

SharePoint Bug with MultiValue Fields

imageImagine you have a list (or document library) which has lots of items. Nothing fancy here. Now add a lookup or user field and allow it to contain multiple values.

Inside a view for this list you can filter e.g. for the title column. The filter dropdown shows all possible values for the column. image

 

 

 

 

 

Here comes the clue. If the item count of the list reaches a number somewhere between 400 and 500 items, the filter dropdown changes. You will get an option to show all filter values. This is for performance reasons.

image

Clicking on the “Show Filter Choices” should bring up the filter dropdown like you see it above. Instead you will get a <!--#RENDER FAILED-->.

image

Why that? It looks like the SQL query is broken, because you get this error in the application log.

5586 Unknown SQL Exception 4104 occured. UserData.tp_ID SELECT DISTINCT

The ULS Log will show an entry like this:

System.Data.SqlClient.SqlException: The multi-part identifier "UserData.tp_ID" could not be bound. ORDER BY items must appear in the select list if SELECT DISTINCT is specified. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior)

SqlError: 'The multi-part identifier "UserData.tp_ID" could not be bound.' Source: '.Net SqlClient Data Provider' Number: 4104 State: 1 Class: 16 Procedure: '' LineNumber: 1 Server: 'vmmoss'

10/22/2008 19:54:48.36 w3wp.exe (0x0BD4) 0x1178 Windows SharePoint Services Database 880j High SqlError: 'ORDER BY items must appear in the select list if SELECT DISTINCT is specified.' Source: '.Net SqlClient Data Provider' Number: 145 State: 1 Class: 15 Procedure: '' LineNumber: 1 Server: 'vmmoss'

10/22/2008 19:54:48.36 w3wp.exe (0x0BD4) 0x1178 Windows SharePoint Services Database 5586 Critical Unknown SQL Exception 4104 occured. Additional error information from SQL Server is included below. The multi-part identifier "UserData.tp_ID" could not be bound. ORDER BY items must appear in the select list if SELECT DISTINCT is specified…

There are some KB articles around the RENDER FAILED problem:

Update 24.10.2008

After communicating with Microsoft, it has been confirmed that the behavior is a bug. The really bad news is, that there will be no fix for this version of SharePoint!

Here is an answer from Microsoft:

Fix request has been rejected because of the following reasons:

1. The 500 unique item limit was picked as a threshold to switch from the V3 style filter menus to the V2 menus because above 500 unique items, the performance of the V3 filter menus degrades.

2. I think we can’t have a specific error msg for this error, because this is a general sql query execute error.

Proposed Workarounds are:

List all known workarounds:

W1: edit the ows.js in ...\...\12 remove the line var L_FilterMode_Text="Show Filter Choices" reboot the server;and now the option 'Show Filter Choices' is no more available.

W2: Reducing the number of fields to a number inferior to 500

If there is any news or if I find another way, I will let you know.

Update:

The problem is fixed with the WSS Cumulative Update from June 30, 2009. Thank you Microsoft.

You have a SharePoint list that has more than 500 items. The list has a column of "People and Groups" type with the "Allow multiple selections" setting set to "Yes". If you click Show Filter Choices in this list, you receive the following error message:

#RENDER FAILED


Published: 10/22/2008  7:44 PM | 6  Comments | 0  Links to this post
Tagged as: SharePoint, SPField