I am shorting a RG on the basis of date. There are some category on the RG of events.
Multiple Dates- In this category user will find multiple dates of the events occurs.
Flexible Dates- individual dates of the events occurs.
If Event is having multiple dates, all the dates will be shown in the RG of Events. Also if Event has single date, date will be shown.
For events with multiple dates, where the first event has passed, the order is still considering the 1st event in the list as the earliest event for the list, even though it has passed already. Means: If today is July 17, and I have two events…
Event a:
15.7.
30.7.
5.8.
Event b:
17.7.
18.7.
19.7.
Event a would still be in front of Event b in the list, since 15.7. is before the 17.7. in the list… even though the mechanism should in this case consider as the date to be taken account the day 30.7. to define the listing position of Event a, as this is the first VALID date of the list.
Can anyone suggest me the conditions and workflow on the RG to do this?
@aditya.rajak - I’m not sure I follow. In the example pic below, there are 2 “Event A” and 2 “Event B” events that have the dates in order. Are you looking for something different?
Have a date field on your Event called something like “Next Date”.
Set it to the soonest date when you create the thing.
Then run something every day, look for Events where the “Next Date” is today, and set it to the next soonest date in the future. Or blank if there are now.
Thanks @NigelG , I am doing the same as you mentioned, I just only want to run something which will run every day as you said above, which will remove the passed date from the Array and set the new latest date in the ‘date field’.
May be a scheduler or or cron job type of method will help me…