User Block Ability

I am trying to filter a list of work, I don’t want work uploaded by a blocked user to be visible
Screenshot 2023-08-06 232452
how do I do this?

You must have a status for a blocked user e.g. Blocked Status = True. Then include an AND statement in the filter for User > Blocked Status is not equal to TRUE.

This way you only get a list of work from not blocked users

Is the True statement only between the user that blocked and was blocked? The list being sorted above is able to be seen by every student in a class. When a student blocks another, I don’t want that student being cut off from the class. Is there a way to only have the user appear blocked only to the person who blocked them?

Please let me know if that made any sense, I’m tired rn.

Does anybody have a solution?

Solution: many to many relationship, User to User. Block button adds logged in user to blocked users “blocked by” list. Filter goes like this
Screenshot 2023-08-08 141602

M2M is one way to go…just like adding favourites…but the logged in user will not add “themselves” as favourite.

The part about

does not really makes sense to me.

My understanding is a partcular user can block other users. So this partcular user will not see the work of the “blocked users”. I hope I have this right.

If the above is true, then each “user profile” can have a block button. Pressing this button will add a certain user to the “Blocked” field in User (just like what you stated M2M User to User). Now what you have is a field that can have more than one element. It should be logical to assume that your users might block more than 1 “other” user.

The problem now becomes how to display the work items seen by a user while “omitting” the work of all blocked users.

There are 15 items of work. I am a user and I have blocked 4 other users. I should only see the work items excluding those submitted by the 4 blocked users

Sounds like M2M filtering which requires a fair bit of work. Simply put you have 15 items submitted by x users & from these you want to filter out work submitted by 4 users.

There have been many topics in this forum about ideas for complex filter with M2M relationships.

Hi @LoneWolf,

Maybe this video I created in the past may help you! : Loom | Free Screen & Video Recording Software | Loom

Thank you

Both ways work, I found success with an older post that suggested it this way.

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