Order list by modification date

Hi everyone. I have a table named events. In this table there is a field that contains the users that want to go to this event. I need to sort this users ordered by the moment that they have confirmed to go to the event. If I sort by the modification date it doesn´t work. Any help?

Hey @Larguitto,

If you have many-to-many relationships between Users and Events, there is no way to know when a certain user has confirmed going to a certain event. There is simply no place to store the time :slight_smile:

If you’d like to store this info, you will have to create an additional “user-visits” table, which will have a relation to Events (1 event can have many visits, but one user-visit can belong only to one event), and a relation to User (1 user can have many user-visits, but one user-visit can belong only to one user).
This is called a 'junction table".
So when a user is joining an event, you create a new record in this table. And based on the creation date you can easily find when user has confirmed the visit (you’ll be displaying user-visits table, filtered by current event and sorted by creation date).

Similar approach is used here: Adalo Mini-app series: Followers, Influencers and follow requests - using separate collection - YouTube

Hope this helps.

Best regards, Victor.

1 Like

Thank you @Victor . I´ll try it.

1 Like

Hi again. It works perfect but… if I someone decides not to go after confirmed it ?.. ¿how can i remove this user from the table user-visits? I only see the option to create a register, not to delete or update a register.

@Larguitto You will need to create a “single item list” of user-visits, filtered by User and Visit. You can perform the actions with this user-visit from inside this list (modify or delete it).

I believe this is explained in the video as well.


1 Like

It works perfect !!!

Thank you @Victor

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.