Thursday, March 6, 2008

Further achivements!

Now Im getting somewhere!

Had a problem today that might interest someone using either DataFormWebPart or SPSiteDataQuery creating querys towards Sharepoint. The problem was with Calendars and retrieving the RecurrentData XML that specified how the event was repeating. In my case when retrieving from the SPList the RecurrentData was empty all the time. I thought first my dataformwebpart xslt was the error but putting the generated XSLT into sharepoint designer revealed no errors. It had to do with the selectcommand of the SPdatasource!
I didnt have a clue but you had to specifiy the column as a if you actually wanted the RecurrentData to show. But I had a mistake in generating the query: I used
<View><ViewField><FieldRef Name="field1" /><FieldRef Name="field2" /></ViewField></View> while sharepoint designer used the very strange syntax:
<View><ViewField><FieldRef Name="field1" /><FieldRef Name="field2" /></ViewField><ViewFields><FieldRef Name="field1" /><FieldRef Name="field2" /></ViewFields></View> OBS ViewFields with the same columns as the ViewField... Microsoft...plz