querry.ExpandRecurrence - request for calendar event

Jun 1, 2010 at 2:41 PM
Hello, I use jPoint to retrieve calendar events from a calendar list i read here http://www.u2u.net/res/Tools/SharePointCamlQueryBuilder.aspx that for Calendare i fI wants to manage recurrent object, I need to use the query option ExpandRecurrence How can I do that with jpoint ?
Coordinator
Jun 2, 2010 at 6:40 AM

Here's an example that includes ExpandRecurrence.

$(document).ready(function(){
    var q = "<listName>Calendar</listName>";	//listname
    q += "<query>"
    q += "<Query xmlns=''>"
    q += "<Where>"
    q += "  <DateRangesOverlap>"
    q += "    <FieldRef Name=\"EventDate\" />"
    q += "    <FieldRef Name=\"EndDate\" />"
    q += "    <FieldRef Name=\"RecurrenceID\" />"
    q += "    <Value Type=\"DateTime\"><Month /></Value>"
    //q += "    <Value Type=\"DateTime\"><Week /></Value>"
    //q += "    <Value Type=\"DateTime\"><Day /></Value>"
    //q += "    <Value Type=\"DateTime\"><Now /></Value>"
    q += "  </DateRangesOverlap>"
    q += "</Where>"
    q += "<OrderBy>"
    q += "  <FieldRef Name='EventDate' Ascending='TRUE' />"
    q += "</OrderBy>"
    q += "</Query>"
    q += "</query>"
    q += "<rowLimit>100</rowLimit>"
    q += "<queryOptions>"
    q += "  <QueryOptions xmlns=''>"
    q += "    <ExpandRecurrences>TRUE</ExpandRecurrences>"
    q += "    <CalendarDate>2010-08-01T00:00:00Z</CalendarDate>";	//look forward from date
    //q += "    <IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns>"
    q += "  </QueryOptions>"
    q += "</queryOptions>";
      
    jP.WebServices.CallSPWebSvc({
        siteUrl:'http://site/path/web', 
        serviceName:'Lists', 
        operationName:'GetListItems', 
        soapBody:q, 
        returnNode:'listitems'
    });
    //process result		
    var out = ""; 
    $.each($(jP.WebServices.Result.xmlDoc).find("[nodeName='z:row']"), function () {
        var row = $(this);
        out += row.attr("ows_EventDate")+"|"+row.attr("ows_Title")+"\n";
    });
		
    alert(out);
});


Jun 7, 2010 at 4:51 PM

Thanks for your response,

 

it perfectly fit with http://www.u2u.net/res/Tools/SharePointCamlQueryBuilder.aspx and the way to build request

unfortunately, I cannot make it works

I just try your sample and change ListName and SiteUrl

it give me back event but does not expend recurring event

Here http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/3c399768-c492-4d7e-8f6e-fa304ed03131

it looks like they says that ExpandRecurrences just "add ows_RecurrenceData property of z:row with the specifics of the recurrence" 

I don't see this property either
Does anyone succeed with that  ?