DVWP does not honor CalendarDate in SharePoint:SPDataSource SelectCommand

I've been able to use the below code to get a DVWP to return appointments for the current month, including recurrences.

However, no matter what I try, I cannot get it to honor the CurrentDate option in QueryOptions.

The DVWP:

<WebPartPages:DataFormWebPart runat="server" Description="" PartOrder="2" HelpLink="" AllowRemove="True" IsVisible="True" AllowHide="True" UseSQLDataSourcePaging="True" ExportControlledProperties="True" IsIncludedFilter="" DataSourceID="" Title="calendar" ViewFlag="8" NoDefaultStyle="TRUE" AllowConnect="True" FrameState="Normal" PageSize="10" PartImageLarge="" AsyncRefresh="False" ExportMode="All" Dir="Default" DetailLink="" ShowWithSampleData="False" ListId="..." ListName="{...}" FrameType="None" PartImageSmall="" IsIncluded="True" SuppressWebPartChrome="False" AllowEdit="True" EnableOriginalValue="False" ChromeType="None" AutoRefresh="False" AutoRefreshInterval="60" AllowMinimize="True" ViewContentTypeId="" InitialAsyncDataFetch="False" MissingAssembly="Cannot import this Web Part." HelpMode="Modeless" ID="..." ConnectionID="00000000-0000-0000-0000-000000000000" AllowZoneChange="True" ManualRefresh="False" __MarkupType="vsattributemarkup" __WebPartId="{...}" __AllowXSLTEditing="true" WebPart="true" Height="" Width="">
    <ParameterBindings>
        <ParameterBinding Name="ListID" Location="None" DefaultValue="{...}"/>
    </ParameterBindings>
    <DataFields>@ID,ID;@ContentType,Content Type;@Title,Title;@Modified,Modified;@Created,Created;@Author,Created By;@Editor,Modified By;@_UIVersionString,Version;@Attachments,Attachments;@File_x0020_Type,File Type;@FileLeafRef,Name (for use in forms);@FileDirRef,Path;@FSObjType,Item Type;@_HasCopyDestinations,Has Copy Destinations;@_CopySource,Copy Source;@ContentTypeId,Content Type ID;@_ModerationStatus,Approval Status;@_UIVersion,UI Version;@Created_x0020_Date,Created;@FileRef,URL Path;@ItemChildCount,Item Child Count;@FolderChildCount,Folder Child Count;@Location,Location;@EventDate,Start Time;@EndDate,End Time;@Description,Description;@fAllDayEvent,All Day Event;@fRecurrence,Recurrence;@WorkspaceLink,Workspace;@ParticipantsPicker,Attendees;@Category,Category;@Facilities,Resources;@FreeBusy,Free/Busy;@Overbook,Check Double Booking;</DataFields>
    <Xsl>...</Xsl>
    <DataSources>
        <SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="...below..." UseInternalName="True" UseServerDataFormat="True" RecurrenceRowset="True" ID="dataformwebpart1">
            <SelectParameters>
                <WebPartPages:DataFormParameter ParameterKey="ListID" PropertyName="ParameterValues" DefaultValue="{...}" Name="ListID"></WebPartPages:DataFormParameter>
            </SelectParameters>
        </SharePoint:SPDataSource>
    </DataSources>
</WebPartPages:DataFormWebPart>

The SelectCommand:

<View>
    <Query>
        <Where>
            <DateRangesOverlap>
                <FieldRef Name="EventDate" />
                <FieldRef Name="EndDate" />
                <FieldRef Name="RecurrenceID" />
                <Value Type="DateTime">
                    <Month />
                </Value>
            </DateRangesOverlap>
        </Where>
        <OrderBy>
            <FieldRef Name="EventDate" />
        </OrderBy>
    </Query>
    <ViewFields>
        <FieldRef Name="Title" />
        <FieldRef Name="EventDate" />
        <FieldRef Name="EndDate" />
        <FieldRef Name="Location" />
        <FieldRef Name="Description" />
        <FieldRef Name="fRecurrence" />
        <FieldRef Name="RecurrenceData" />
        <FieldRef Name="fAllDayEvent" />
    </ViewFields>
    <QueryOptions>
        <CalendarDate>2016-01-01T12:00:00Z</CalendarDate>
        <RecurrencePatternXMLVersion>v3</RecurrencePatternXMLVersion>
        <ExpandRecurrence>TRUE</ExpandRecurrence>
    </QueryOptions>
</View>


August 31st, 2015 9:24pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics