We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Uniquely identify each occurrence of recurring event

Thread ID:

Created:

Updated:

Platform:

Replies:

149210 Nov 19,2019 05:40 AM UTC Nov 21,2019 12:34 PM UTC Angular - EJ 2 3
loading
Tags: Schedule
jose lara
Asked On November 19, 2019 05:40 AM UTC

Hi, I spent a lot of time browsing and experimenting with various examples posted on the docs and forums, but I am not able to think of a way to achieve what I want. When a recurring event is created on the scheduler, it is usually stored as one single record in the DB, with recurrenceRule string as a column. The problem with this approach is that, there is no way to uniquely identify one single occurrence in a series and add attributes specific to that occurrence. For e.g. what if I want to have "classroom" as location, for all occurrences of a series, EXCEPT the last one, which has "playground" as the location?  (I am referring to the location (second column) of the event editor window)

I also looked at recurrence exception, but that only contains excluded dates from a series, but doesn't store what information really differed from the series and the individual occurrence. For the above example, how can I represent the fact that, only the last occurence in the series has a different location? 

I observed that every occurrence on the scheduler has GUID, which is unique. Is there a way I can use this GUID to track individual occurences 
in a series, to identify them uniquely? For instance, after I create a series of 10 occurrences, all having the location initially, 
but I then edit location of the last occurrence? In this case, can I store this change in the DB, by using the last occurence's GUID
along with the changed location? Also, keep in mind I use REST APIs to interact with my backend; I am using promises to interact with backend

A code sample will be helpful.

thx



Attachment: Archive_11d35184.zip

Vengatesh Maniraj [Syncfusion]
Replied On November 20, 2019 12:56 PM UTC

Hi Jose, 
Syncfusion greetings. 
We can get the recurrence event collection for a single record by using getOccurrencesByID method. But we can not edit the particular event form this list. Because we have filter the recurrence events(while editing) by getting the events which is rendered in the current view. If the event is rendered in the current view which one we wish to edit, we can edit it easily by using saveEvent method. But if it is not in the current view, we can not edit. We have prepared the sample for getting all the recurrence collections for particular events which is available in below link. 
Kindly try the above sample and revert us for further assistance. 
 
Regards, 
Vengatesh 


jose lara
Replied On November 20, 2019 09:00 PM UTC

I am already aware of getOccurrencesByID and this is not helpful in my case. This is just a bad design in my opinion. When you update a field (location for example) of  a specific occurrence in a series, I see the "Recurrence exception" field getting updated with this particular event's date. But, how can you keep track of what information changed in that particular event? I am trying to save the information that changed (updated location) and save it in the DB. This will help me fetch the updated details from the DB when the user refreshes the page or navigates to that particular date. 



Vinitha Devi Murugan [Syncfusion]
Replied On November 21, 2019 12:34 PM UTC

Hi Jose, 
 
Thanks for your update. 
 
We have checked the reported scenario at our end. We can get the event fields which edited from the series by comparing the edited event with it series events. We have no other in-build functionality to get what field edited in particular series. We have prepared the sample based on your requirement which is available in below link. 
 
https://stackblitz.com/edit/angular-h76rah-rait53?file=app.component.ts                                                                                                                                               
 
In the above sample, we have excluded the Id, RecurrenceException, RecurrenceRule StartTime and EndTime fields from comparison. While comparing the event data, Id field is always varied. So no need to include this in comparison. Based on your requirement you can include StartTime and EndTime fields. 
 
 
Regards, 
M.Vinitha devi 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon