# User Block Ability

**URL:** <https://forum.adalo.com/t/user-block-ability/41103>\
**Category:** Get Help\
**Created:** [August 7, 2023, 4:36am UTC](https://forum.adalo.com/t/user-block-ability/41103 "2023-08-07T04:36:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![LoneWolf](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/lonewolf/32/30903_2.png) [@LoneWolf](https://forum.adalo.com/u/LoneWolf)\
**Post date:** [August 7, 2023, 4:36am UTC](https://forum.adalo.com/t/user-block-ability/41103/1 "2023-08-07T04:36:00Z")

</div>

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](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/9/8/98611d2e0c28d36b44d358f959fdfe537c2153ce.png)  
how do I do this?

---

<div class="post-metadata">

**Author:** ![eduscvs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/eduscvs/32/25597_2.png) [@eduscvs](https://forum.adalo.com/u/eduscvs)\
**Post date:** [August 7, 2023, 5:35am UTC](https://forum.adalo.com/t/user-block-ability/41103/2 "2023-08-07T05:35:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![LoneWolf](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/lonewolf/32/30903_2.png) [@LoneWolf](https://forum.adalo.com/u/LoneWolf)\
**Post date:** [August 8, 2023, 3:31am UTC](https://forum.adalo.com/t/user-block-ability/41103/3 "2023-08-08T03:31:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![LoneWolf](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/lonewolf/32/30903_2.png) [@LoneWolf](https://forum.adalo.com/u/LoneWolf)\
**Post date:** [August 8, 2023, 7:00pm UTC](https://forum.adalo.com/t/user-block-ability/41103/4 "2023-08-08T19:00:14Z")

</div>

Does anybody have a solution?

---

<div class="post-metadata">

**Author:** ![LoneWolf](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/lonewolf/32/30903_2.png) [@LoneWolf](https://forum.adalo.com/u/LoneWolf)\
**Post date:** [August 8, 2023, 7:16pm UTC](https://forum.adalo.com/t/user-block-ability/41103/5 "2023-08-08T19:16:14Z")

</div>

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](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/6/c/6ceec8811e2f0307a0b14e3492dacadf309346f7.png)

---

<div class="post-metadata">

**Author:** ![eduscvs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/eduscvs/32/25597_2.png) [@eduscvs](https://forum.adalo.com/u/eduscvs)\
**Post date:** [August 8, 2023, 11:33pm UTC](https://forum.adalo.com/t/user-block-ability/41103/6 "2023-08-08T23:33:30Z")

</div>

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

The part about

> [@LoneWolf](#):
>
> Block button adds logged in user to blocked users “blocked by” list.

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.

**Example** :  
_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.

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [August 9, 2023, 10:21am UTC](https://forum.adalo.com/t/user-block-ability/41103/7 "2023-08-09T10:21:53Z")

</div>

Hi @LoneWolf,

Maybe this video I created in the past may help you! : [Loom | Free Screen & Video Recording Software | Loom](https://www.loom.com/share/bb8c0fa5afd544949254f54b6dec1f03)

Thank you

---

<div class="post-metadata">

**Author:** ![LoneWolf](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/lonewolf/32/30903_2.png) [@LoneWolf](https://forum.adalo.com/u/LoneWolf)\
**Post date:** [August 9, 2023, 7:33pm UTC](https://forum.adalo.com/t/user-block-ability/41103/8 "2023-08-09T19:33:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [August 19, 2023, 7:33pm UTC](https://forum.adalo.com/t/user-block-ability/41103/9 "2023-08-19T19:33:43Z")

</div>

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