# Change value on firebase

**URL:** <https://community.thunkable.com/t/change-value-on-firebase/173827>\
**Category:** Questions about Thunkable X\
**Tags:** firebase\
**Created:** [August 8, 2019, 8:14am UTC](https://community.thunkable.com/t/change-value-on-firebase/173827 "2019-08-08T08:14:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![saadndarabu977](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@saadndarabu977](https://community.thunkable.com/u/saadndarabu977)\
**Post date:** [August 8, 2019, 8:14am UTC](https://community.thunkable.com/t/change-value-on-firebase/173827/1 "2019-08-08T08:14:05Z")

</div>

Hello!  
I have linked my app to firebase successfully and can view the data on my app. I want to enable users of my app to change a particular value on the application.  
For example:  
On firebase I have  
Consumers/ID/Balance  
And I want the users to be able to add a number on that value. I have attached a ss of my blocks and have no idea what I’m doing wrong. Please help!!

 ![help%20thunkable](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/1/b11786cb4ecb536f07417baee86d454d65a93aad.png)

---

<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:** [August 8, 2019, 8:41am UTC](https://community.thunkable.com/t/change-value-on-firebase/173827/2 "2019-08-08T08:41:15Z")

</div>

Hello,

Value is a local variable whose value is defined only inside the block containing it

---

<div class="post-metadata">

**Author:** ![saadndarabu977](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@saadndarabu977](https://community.thunkable.com/u/saadndarabu977)\
**Post date:** [August 8, 2019, 10:42am UTC](https://community.thunkable.com/t/change-value-on-firebase/173827/3 "2019-08-08T10:42:41Z")

</div>

I declared a global variable “Balance” and then stored the firebase balance value as Balance. Now i did the addition to the global variable and then stored this variable as the firebase value of Balance. It still isn’t working

---

<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:** [August 8, 2019, 12:06pm UTC](https://community.thunkable.com/t/change-value-on-firebase/173827/4 "2019-08-08T12:06:34Z")

</div>

Have you enabled permission to write data to Firebase?

Do you see the “error” variable in the blocks? I recommend that you always display the value of this variable on the screen. Otherwise, if an error occurs, it will be very difficult for you to understand what is happening.

I will say more precisely - compile all the algorithms with error handling. In the documentation and on the forum, users often do not do this and spend a lot of time and effort on something that could be understood in 3 minutes if they were doing error handling.

To effectively search for errors, use global variables such as “clouds” and listeners for them with the output of the results in a multi-line “Label”. Then you can control the values.

For example, the “error” block, you can just assign the variable “cloud”

---

<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, 12:11pm UTC](https://community.thunkable.com/t/change-value-on-firebase/173827/5 "2024-11-08T12:11:55Z")

</div>


