# How to update a stored local partial list on Firebase

**URL:** <https://community.thunkable.com/t/how-to-update-a-stored-local-partial-list-on-firebase/338179>\
**Category:** Questions about Thunkable X\
**Created:** [November 26, 2019, 8:56am UTC](https://community.thunkable.com/t/how-to-update-a-stored-local-partial-list-on-firebase/338179 "2019-11-26T08:56:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![intorciapclgd](https://avatars.discourse-cdn.com/v4/letter/i/a698b9/32.png) [@intorciapclgd](https://community.thunkable.com/u/intorciapclgd)\
**Post date:** [November 26, 2019, 8:56am UTC](https://community.thunkable.com/t/how-to-update-a-stored-local-partial-list-on-firebase/338179/1 "2019-11-26T08:56:10Z")

</div>

Hi, i’ve a problem: I’ve a series of object on firebase, of all the users. I’ve stored locally same object to use without connection (onlyone the user had stored). How I can update the local list when firebase change? I dont want to store all the record locally! I try with a Loop, with listener, with “for each”, but the local list don’t upload (or randomly). In the object I created a field with 2 index, local and firebase… but dont work! Thanks

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [November 26, 2019, 10:12am UTC](https://community.thunkable.com/t/how-to-update-a-stored-local-partial-list-on-firebase/338179/2 "2019-11-26T10:12:14Z")

</div>

You need to use a listener for the desired object node, and then save the change when the listener is executed in the stored variable.

---

<div class="post-metadata">

**Author:** ![intorciapclgd](https://avatars.discourse-cdn.com/v4/letter/i/a698b9/32.png) [@intorciapclgd](https://community.thunkable.com/u/intorciapclgd)\
**Post date:** [November 26, 2019, 10:17am UTC](https://community.thunkable.com/t/how-to-update-a-stored-local-partial-list-on-firebase/338179/3 "2019-11-26T10:17:23Z")

</div>

Thanks, I’ll try, but i’ve to add a listener for each local record? is not a problem to create multiple listner (one for each object)? can I do it with a loop?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [November 26, 2019, 12:46pm UTC](https://community.thunkable.com/t/how-to-update-a-stored-local-partial-list-on-firebase/338179/4 "2019-11-26T12:46:23Z")

</div>

I understand correctly that you want to save only the data that relates to this user on the user’s device? If this is the case, then you need to create a cloud variable with a mutable name that will be populated during user registration. That is, the pathname in the listener depends on the user ID in the database.

And for what purpose I do not understand the use of the loop.

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [November 26, 2019, 1:21pm UTC](https://community.thunkable.com/t/how-to-update-a-stored-local-partial-list-on-firebase/338179/5 "2019-11-26T13:21:36Z")

</div>

The cloud variable has a block like this.

Try adding one to your project and then open the variables drawer - you will now see a new “when data changed” event listener.

---

<div class="post-metadata">

**Author:** ![intorciapclgd](https://avatars.discourse-cdn.com/v4/letter/i/a698b9/32.png) [@intorciapclgd](https://community.thunkable.com/u/intorciapclgd)\
**Post date:** [November 26, 2019, 2:26pm UTC](https://community.thunkable.com/t/how-to-update-a-stored-local-partial-list-on-firebase/338179/6 "2019-11-26T14:26:40Z")

</div>

thank you, I used the listner and I (you) solve :-)… can I ask you about using Cloud Variable? How I can Show in a list viewer the field of all the object inside the record (or, if is possible, how I can filter the record?) I want to show all the record with a control field setting to 0, I can use “for each items”, but i need to store on another local variable… Thanks

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:46am UTC](https://community.thunkable.com/t/how-to-update-a-stored-local-partial-list-on-firebase/338179/7 "2024-11-08T11:46:35Z")

</div>


