# Database relationship, Please help :)

**URL:** <https://forum.adalo.com/t/database-relationship-please-help/39210>\
**Category:** Database\
**Created:** [May 24, 2023, 7:18pm UTC](https://forum.adalo.com/t/database-relationship-please-help/39210 "2023-05-24T19:18:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toey](https://avatars.discourse-cdn.com/v4/letter/t/f6c823/32.png) [@Toey](https://forum.adalo.com/u/Toey)\
**Post date:** [May 24, 2023, 7:18pm UTC](https://forum.adalo.com/t/database-relationship-please-help/39210/1 "2023-05-24T19:18:53Z")

</div>

Hi All,

I’m trying to create simple application which is the task list for multi-user.

I test it with 2 user but the app display the same result. I really dont know how to make each user see their own progess.

When I logged in with USER A. I check 5 out of 10 task as completed and then I logged out.

I logged in with USER B. The task should be 0 completed and 10 pending task but the USER B also see the result from USER A.

I set database relationship between user and task as “Many to Many” but It doesnt work like I want it to be.

 ![messageImage_1684954852721](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/2/3/23ee207c5ffa3fe0df96073126ff448e231c7feb.jpeg)

 ![messageImage_1684955870884](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/e/9/e94e67c386af3a7339dde551e1ce0f0c9586eb9c.jpeg)

[App link](https://previewer.adalo.com/c2254c6e-6420-499a-976a-742226e4c004)

Please Help, Many thanks.

---

<div class="post-metadata">

**Author:** ![Yongki](https://avatars.discourse-cdn.com/v4/letter/y/7c8e57/32.png) [@Yongki](https://forum.adalo.com/u/Yongki)\
**Post date:** [May 24, 2023, 9:14pm UTC](https://forum.adalo.com/t/database-relationship-please-help/39210/2 "2023-05-24T21:14:59Z")

</div>

Hi @Toey ,

At the list choose task collection and use filter like logged in user \> tasks

This will show only task that are related to the user.

---

<div class="post-metadata">

**Author:** ![Toey](https://avatars.discourse-cdn.com/v4/letter/t/f6c823/32.png) [@Toey](https://forum.adalo.com/u/Toey)\
**Post date:** [May 24, 2023, 11:58pm UTC](https://forum.adalo.com/t/database-relationship-please-help/39210/3 "2023-05-24T23:58:25Z")

</div>

Hi Yongki,

Many thanks for your answer.

I might explain to you not clearly enough. I would like to use 10 task in the DB for all the user. I dont want to create 10 new task everytime there is a new user.

I tried your recommendation. USER A see all the task but USER B see nothing.

Please see these attached photos below.

 ![messageImage_1684972570860](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/e/1/e17c2e89d8bc108090eb6ae9d91cab3d01459502.jpeg)

![messageImage_1684972579217](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/5/4/54744270dde77713a9f4c9d4733a55c98857c218.jpeg)

 ![messageImage_1684972643288](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/c/e/ce67612d0e98225e049c43236ea0cd59d9fdb49a.jpeg)

---

<div class="post-metadata">

**Author:** ![Yongki](https://avatars.discourse-cdn.com/v4/letter/y/7c8e57/32.png) [@Yongki](https://forum.adalo.com/u/Yongki)\
**Post date:** [May 25, 2023, 5:11am UTC](https://forum.adalo.com/t/database-relationship-please-help/39210/4 "2023-05-25T05:11:09Z")

</div>

Hi @Toey ,

I have made example app here,  
[User Tasks (adalo.com)](https://previewer.adalo.com/5661c5c3-3328-48ee-b497-623be268c605?_gl=1*1toyf3z*_ga*MTk2NzYyNjI4OS4xNjcwNTQ3Njg3*_ga_SWT45DV35L*MTY4NDk4OTgwNi4yMzkuMS4xNjg0OTkwNzYxLjM0LjAuMA..)

You can clone to see the inside.

 ![Screen Shot 2023-05-25 at 12.09.44 PM](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/3/c/3c34470efafd2df83faecf6cba51cce7a33b333d.png)  
 ![Screen Shot 2023-05-25 at 12.10.01 PM](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/2/0/2074753b4f8b1a6f5a0f86ad8228e475eb7e8705.png)

So there are initial tasks which all users can see and there are tasks that are attached to certain user.

---

<div class="post-metadata">

**Author:** ![Toey](https://avatars.discourse-cdn.com/v4/letter/t/f6c823/32.png) [@Toey](https://forum.adalo.com/u/Toey)\
**Post date:** [May 25, 2023, 5:36pm UTC](https://forum.adalo.com/t/database-relationship-please-help/39210/5 "2023-05-25T17:36:50Z")

</div>

Hi Yongki,

Thank you so much. Your example app is what I want. 😁 I cloned it and played with it.

However, I can’t replicate what you have done here. Could you please share the relationship between all three collections with me? 🥺

I’m not sure if these are correct or not.

User & Task

 ![messageImage_1685035998233](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/f/6/f6a51117e46bf96a8bf170f9add503b4f796d016.jpeg)

Initial task & Task

 ![messageImage_1685035940357](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/5/2/52a3b7682f7f05ac3b3db044b1bb99ef6cce1d84.jpeg)

many thanks 😊

---

<div class="post-metadata">

**Author:** ![Toey](https://avatars.discourse-cdn.com/v4/letter/t/f6c823/32.png) [@Toey](https://forum.adalo.com/u/Toey)\
**Post date:** [May 25, 2023, 7:04pm UTC](https://forum.adalo.com/t/database-relationship-please-help/39210/6 "2023-05-25T19:04:15Z")

</div>

Dear Yongki,

I tried to replicate your app. The completed task seems to be working fine, but I wonder how you made the pending task disappear when the checkbox was pressed.

All I can see is that you chose the list as Initial task and filtered for All Initial tasks. So, what I understand is that the list will stay the same no matter what.

How did you make Pending Task go away when checked?

 ![messageImage_1685041360449](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/6/e/6ecabd5d64a76d8fc0e378f2a8c3b7c5f6814a36.jpeg)

 ![messageImage_1685040935813](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/0/e/0e54b76b9d63b38b339a9aa64df50c6ab98dcf71.jpeg)

---

<div class="post-metadata">

**Author:** ![Yongki](https://avatars.discourse-cdn.com/v4/letter/y/7c8e57/32.png) [@Yongki](https://forum.adalo.com/u/Yongki)\
**Post date:** [May 25, 2023, 8:16pm UTC](https://forum.adalo.com/t/database-relationship-please-help/39210/7 "2023-05-25T20:16:50Z")

</div>

Yes, that is correct.

---

<div class="post-metadata">

**Author:** ![Yongki](https://avatars.discourse-cdn.com/v4/letter/y/7c8e57/32.png) [@Yongki](https://forum.adalo.com/u/Yongki)\
**Post date:** [May 25, 2023, 8:17pm UTC](https://forum.adalo.com/t/database-relationship-please-help/39210/8 "2023-05-25T20:17:23Z")

</div>

Put conditional visibility on the rectangle inside the initial task list, as my previous post.

---

<div class="post-metadata">

**Author:** ![Toey](https://avatars.discourse-cdn.com/v4/letter/t/f6c823/32.png) [@Toey](https://forum.adalo.com/u/Toey)\
**Post date:** [May 25, 2023, 9:09pm UTC](https://forum.adalo.com/t/database-relationship-please-help/39210/9 "2023-05-25T21:09:15Z")

</div>

Thank you so much Yongki, I missed this one. 😄, You saved my day.

 ![messageImage_1685048675609](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/e/5/e5a538aa99b60a1734ae7ed530915d25757d1461.jpeg)
