3

Using Jquery & Caml Query Retrieve Upcoming Events form Calendar List.I use below query but it not work. It display only start date of Recursive Event.

My caml query is:

<Query>
<Where>
<DateRangesOverlap>
<FieldRef Name="EventDate" />
<FieldRef Name="EndDate"/>
<FieldRef Name="RecurrenceID"/>
<Value  Type='DateTime'>
<Now />
</Value>
</DateRangesOverlap>
</Where>
<OrderBy>
<FieldRef Name='EventDate' />
</OrderBy>
</Query>
2

You need to ExpandRecurrence

http://sharepointchan.blogspot.hr/2011/10/situation-i-want-to-get-all-calendar.html

Or with jquery.SPServices http://spservices.codeplex.com/discussions/254560

 CAMLViewFields: "<ViewFields>" +
                    "<FieldRef Name='Title' />" +
                    "<FieldRef Name='EventDate' />" +
                    "<FieldRef Name='EndDate' />" +
                    "<FieldRef Name='Location' />" +
                    "<FieldRef Name='Description' />" +
                    "<FieldRef Name='PublishingPageContent' />" +
                    "<FieldRef Name='Category' />" +
                    "<FieldRef Name='fRecurrence' />" +
                    "<FieldRef Name='RecurrenceData' />" +
                    "<FieldRef Name='fAllDayEvent' />" +
                "</ViewFields>",
            CAMLQuery: '<Query><Where>' +
                    '<DateRangesOverlap>' +
                        '<FieldRef Name="EventDate" />' +
                        '<FieldRef Name="EndDate" />' +
                        '<FieldRef Name="RecurrenceID" />' +
                        '<Value IncludeTimeValue="TRUE" Type="DateTime">' +
                            '<Now/>' +
                        '</Value>' +
                    '</DateRangesOverlap>' +
                '</Where>' +
                '<OrderBy>' +
                    '<FieldRef Name="EventDate" />' +
                '</OrderBy>' +
            '</Query>',
            CAMLQueryOptions: '<QueryOptions>' +
                    '<CalendarDate><Year/></CalendarDate>' +
                    '<RecurrencePatternXMLVersion>v3</RecurrencePatternXMLVersion>' +
                    '<ExpandRecurrence>TRUE</ExpandRecurrence>' +
                '</QueryOptions>',    

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.