AgendaList groupBy sort repeats according to their ID instead of dates


I use AgendaList snippet to display events of a specific category… some of them are repeated ones (quite often for some) so i used &groupby =id to display them only once, the closest in time only.

I noticed that the repeating dates (of the subquery probably) are sorted according to their ID, not the startdate. So, if you add a date of recurrence after another one, even if the new one is closer in time, the one you added first is still the one displayed.

Do you have any idea to sort them from closest to furthest in time ?

Can you please post the Snippet call here?

&detailId = 271
&groupby =id
&sortby = { “all_startdate”:“ASC”}
&end=today +3 month 0:00 ]]

I tried several &sortby… this is the one in use for now

Note : the values have backticks around… the forum doesn’t render them

You have to add three backticks around your code to be displayed without stripping the backticks inside.

Can you try this:



&sortby=`{ "EventDate.startdate":"ASC" }`

As soon as i add this line :

the snippet stops working and i got no results… not 0 result… just nothing, no output at all