How can I make it so that each individual user can delete only his own notifications?

Ciao a tutti,
I am making improvements to my app.

When the admin sends notifications to all users, they are displayed in a specific window.
I am trying to make it so that the individual user is able to delete the notifications received, but without deleting those of others. Kind of like what happens in an app like Facebook.

I created a relationship with the user collection and added a user update action to the ‘Send Notification’ button where I entered the addition of the new notification in the ‘notifications’ field.

Is it possible?
Thank u for your support :slight_smile:

Hi Dave :wave:
I think it’s simple, just think backwards.
Add a relationship to users under a new Notifications collection property and call it for example “Deleted by”,

When the user clicks on the notification they want to delete, the action will be : Update Current Notification - Deleted by - add Logged in user.

This way you can filter the list of notifications with Deleted by - does not contain - Logged in user.

Hope that helped

Ciao Eugen,
thank you for responding to me.
This step I did, somehow I can get the user to cancel the notification.

The problem is first. I can’t get the notification to save to each individual user’s collection. I set an action to update the user in the notification field…but only to the admin who generates the notification is saved.

Maybe I need to create a group?

Can you help me more?

Can you please share an image of the configuration of the update action you have added?

Thank you!

Hi @Ali-Bazzi,
thank you for writing, I appreciate it very much.

Here are some pictures of how I configured notification creation and user-notification relationships. I’ve tried different configurations, but I can’t seem to find the solution.
I hope your help will lead me to the final result :slight_smile:

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