I am having some problems with the values getting returned for calculated and url fields when I query multiple lists with SPSiteDataQuery.

The values for these fields are no longer returned in the standard format. For a calculated field the value is a direct match instead of datatype;#value and for a url field only the url is returned, the description is missing.

It seems that as soon as I cut the query down to a only lists with a calculated field in them then the values are fine (all calculated fields are returned properly then, not just the ones in both lists).

The main problem is with the calculated fields, as SPFieldCalculated.GetFieldValueAsText throws an exception when the data type is missing - SPFieldUrlValue works fine.

Has anyone seen this behavior before?


Yes there is a bug with the SPSiteDataQuery class. See the links below.



  • Hi Steve, Thanks for the reply, but in my case I see this effect when I query two lists. I will be redoing my development site in the next few days and will try and narrow down the problem to see if it is the same issue. Thanks again Calum – Anonymous May 10 '10 at 22:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy