Hi,
I’m working on creating some sort of social network with Adalo. In the app I have created an Activity screen that should house all the notifications, new and old. I want to differentiate the new and old notification so the users have a visual trigger which notifications they haven’t seen yet.
Firstly, to have this to work, I added an Update user action on the screen itself.
When the user visits the screen, the field Viewed Activity in the Users collection changes to the current time for the logged in user.
This works as you see below in a record the Users collection.
When a user likes or comments on a post, a record is created in another collection called Notifications. This fills in some data like the type of content, the recipient etc, but the most important field for this is the field Created Date/Time. This stores the current time at the moment a user likes a post.
This also works when I look at the record in the Notifications collection.
Going back to the Activity screen, I tried to add some filters to the old and new notification lists to make this work. Below are the filters the new notifications list.
Alas, this is where I’m starting to get my issue.
The logic is: check if the value (or date) in the Created Date/Time field (in the Notifications collection) is after the value (or date) in the Viewed Activity field. If that’s true, then this is a new notification and should be showed in that list.
If I remove the custom filter, then the list shows all the notification for that user, so there is something wrong with that custom filter, I’m afraid.
Does anybody see the issue in this? I’m breaking my head over this and can’t seem to find out why this isn’t working.
Hopefully I made myself a bit clear. I can only use 5 embedded images as a beginning user of this forum, so I can add some more screenshots in another post, if there is some more information needed.
Much appreciated!
Kr,
Jan