4

I have a calendar for nurses to update with visit information. They are scheduled using a recurring event. For example, they may want see a client every Friday for 10 weeks. This is easy in the SP calcendar. I have added columns that indicate the clients status and medications for each visit. I want to be able to update each visit individually, as different medicine could be required for each visit.

Is there a way to update recurring events individually in .net?

4 Answers 4

3

Recurring events are complex. Really complex. You may want to ditch them altogether and put in the instances individually - as you are doing this by code then that shouldn't take much effort (certainly less that writing code that can work with recurring events.)

If you're fearless then you need to understand how SharePoint stores recurring events :-

There is a master "Series" record - something like "Event X, 10am to noon on the first Monday of each month"

Then you have "event exception" records - so if you change one event instance from Monday to Tuesday (or in your case update details of the individual visit) this event exception will say something like "The instance of this master event that was due to take place on this date is now replaced by this"

In effect this means that to remove an instance of an event you actually insert a new record.

This is the single best resource for how this works, though he is only talking about reading the recurring event data.

If you play around with a calendar and keep switching to the "All Events" view you will get a feel for how it works.

0

Yes, you'll need the Lists.asmx web service, UpdateListItems a little knowledge of CAML and the field specifically.

http://sharepoint.microsoft.com/blog/Pages/BlogPost.aspx?PageType=4&ListId={72C1C85B-1D2D-4A4A-90DE-CA74A7808184}&pID=761 should give you all you need.

A working example of some CAML that'd update item 37 in a Calendar would be

37 True True <recurrence><rule><firstDayOfWeek>su</firstDayOfWeek><repeat><weekly mo='TRUE' weekFrequency='1'/></repeat><repeatForever>FALSE</repeatForever></rule></recurrence> <timeZoneRule><standardBias>0</standardBias><additionalDaylightBias>0</additionalDaylightBias></timeZoneRule> 1

Note that you need to use &lt and &gt within the RecurrenceData tag

1
  • Its a bit more complex than that when working with recurring events.
    – Ryan
    Commented Jun 20, 2011 at 16:34
0

Ryan - this is really old but I had great interest in reading your reference to a blog post about reading the data but unfortunately the link is redirected at this point. Would you have a copy of the post archived somewhere or maybe a representative string from the post that might trigger a search?

Thanks! Ken

1
  • I updated the link you're referring to.
    – Mario
    Commented Feb 8, 2017 at 15:27
-1

I think following URL might help you.

http://sharepointmagazine.net/articles/writing-caml-queries-for-retrieving-list-items-from-a-sharepoint-list

Regards, Sudhir Kesharwani

1
  • That article metions reading from a list, it has nothing in it about writing or updating a list and nothing about recurring events - which will be the hard part of the OP's request.
    – Ryan
    Commented Jun 20, 2011 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.