Sort the Repeating group on the based of date

Hello all,

I am shorting a RG on the basis of date. There are some category on the RG of events.

  1. Multiple Dates- In this category user will find multiple dates of the events occurs.
  2. 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?

Thanks

1 Like

Hi @aditya.rajak - are you using “Current date/time” in your RG filter such that if an event occurred prior to today’s date, filter it out.

Yes @nikolai, I am using “Current date/time” in RG filter to hide the prior to today’s date.

@aditya.rajak - I created a little prototype that may help. Does this proto behave as you’re expecting?

1 Like

Thank you @nikolai, This is just appreciable. But what if I have Events with multiple dates? Can I sort the Events by multiple date list?

@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?
image

Yes, the concept is same but Here in my App I am storing the multiple dates in the field ‘multipleDates’ and it is an array.

What do those unique ID’s represent? Different Events? Is your database structured such that you create Dates and add Events to each Date?

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.

Then sort on this.

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…

Easycron or Zapier, or run a daily API workflow from Bubble ?

I haven’t use any one of them yet. What should be appropriate for me to remove the old date form the array at a specific time like 12:00 am ?

This topic was automatically closed after 70 days. New replies are no longer allowed.