# Update created database

**URL:** <https://forum.adalo.com/t/update-created-database/10475>\
**Category:** Database\
**Created:** [March 18, 2021, 7:31pm UTC](https://forum.adalo.com/t/update-created-database/10475 "2021-03-18T19:31:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![reginald](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@reginald](https://forum.adalo.com/u/reginald)\
**Post date:** [March 18, 2021, 7:31pm UTC](https://forum.adalo.com/t/update-created-database/10475/1 "2021-03-18T19:31:09Z")

</div>

Hello everybody

I’m a recent user of Adalo and I’m strulling with a functionnality I want to implement  
My app is basic I’ve 2 database :

- users with various informations and a unique ID for each users
- predefined challenges with also a unique ID for each challenge and various informations

The user can see the list of challenges and select one to read it and complete the challenge.  
So I created a 3rd data base creating a line each time a user click on a challenge, he can the update a boolean to say if the challenge is achieve or not.

But It only works if i check the box or not just after the creation. If I go back to a previously created challenge (for exemple yesterday) the app doesn’t know I’m selecting on previous line and I cannot update anything. Can you help me with this issue ?  
Thanks a lot everybody

Regi

---

<div class="post-metadata">

**Author:** ![Victor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/victor/32/2054_2.png) [@Victor](https://forum.adalo.com/u/Victor)\
**Post date:** [March 20, 2021, 4:52pm UTC](https://forum.adalo.com/t/update-created-database/10475/2 "2021-03-20T16:52:25Z")

</div>

Hi @reginald,

In brief:

- let’s assume your 3rd database is called “Taken Challenges” and has a relation to Challenge, User and some data about the date, completed, etc.
- when user goes to the list of challenges (2nd DB), for the button “Take challenge” you need to set up conditional visibility: visible only if “Taken Challenges”-\>Count, Filtered by “Taken Challenge Name equals to current Challenge Name” plus User equals to Logged-in User, is equal to 0.  
This means that if there are NO records in “Taken Challenges” DB with the same name and logged-in user, button “Take challenge” is visible.
- you could also add a label “this challenge is already taken” label with the opposite visibility logic (i.e. count \> 0)
- as for taken challenges, I’d suggest having a separate screen for them.

Here I avoid Many-to-Many relationships, as they seem to be slow sometimes.

Hope this helps

Best,  
Victor.

---

<div class="post-metadata">

**Author:** ![reginald](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@reginald](https://forum.adalo.com/u/reginald)\
**Post date:** [March 22, 2021, 8:52am UTC](https://forum.adalo.com/t/update-created-database/10475/3 "2021-03-22T08:52:52Z")

</div>

Hello Victor !

Thanks for your answer. That was my issue I wanted to have the same page/list to see taken challenges and the standard list of challenge. That was impossible, as far as I know the tool !

So I’ll create another page to go to taken challenges. But now I’ve another problem, i’ve a boulean value column in this 3rd database. And when i create the list of all taken challenges I do not achieve to crate a filter for this information (with a dropdown menu). Is it possible ?

Thanks a lot,  
Reginald

---

<div class="post-metadata">

**Author:** ![Victor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/victor/32/2054_2.png) [@Victor](https://forum.adalo.com/u/Victor)\
**Post date:** [March 22, 2021, 9:21am UTC](https://forum.adalo.com/t/update-created-database/10475/4 "2021-03-22T09:21:24Z")

</div>

Hi @reginald,

> [@reginald](#):
>
> That was my issue I wanted to have the same page/list to see taken challenges and the standard list of challenge. That was impossible, as far as I know the tool !

This is not impossible, it just requires a bit of additional setup 🙂

Here is the logic: you create a list of Challenges, then inside this list you have 2 buttons with conditional visibilities. One button is “Take challenge”. It will be visible only if Count of Logged-In User → TakenChallenges, filtered where TakenChallengeID equals to current ChallengeID, is equal to 0.  
This “Count” means that you take all TakenChallenges of Logged-in user, search if there are challenges equal to current “Standard challenge”, and if there is no such entries - user can take a new challenge.

And the 2nd button will be a single-item list of Logged-In User → Taken Challenges, filtered by TakenChallengeID equals to current ChallengeID. Here if there is a taken challenge - you can lead the user to another screen (say, comments, complete, etc.).

The reason I’ve suggested having a separate screen - if you have say 50 challenges, and 25 taken challenges, it may take some time to load all these lists.

> [@reginald](#):
>
> But now I’ve another problem, i’ve a boulean value column in this 3rd database. And when i create the list of all taken challenges I do not achieve to crate a filter for this information (with a dropdown menu). Is it possible

As for this question - general principle is: to work with any records, their data should be available on this screen.  
So either you access the property via the list, or you have a relation between collections.

Hope this helps

Best,  
Victor
