How to add value to an exsisting value in firebase database?

Hey Koders,
I’m here to learn, how to add values in existing values in Firebase database.
Example for better understanding:
Like I have a tag in which 15 is stored and then I want to store add 10 in existing value, Means-by it should added like (existing value + current value) 15 + 10 = 25 and now 25 will be stored in that tag in Firebase database.

Is it possible to do that, please reply to this question as soon as possible. (I’m waiting)

Hello Wins,

First of all welcome to community! You can do the same with “Get Value” block and after receiving add your preferred number then by “Store Value” block store the updated data.

can you please provide blocks for better understanding, I’ll very thankful to you!

I’m trying to doing this but not performed it was not adding and values goes to zero (0).
Please reply this…

First of all get your value from firebase like my tag is Number and i set get value from tag Number after receive the value simple store it anyware and when you want to update value set block store data tag Number and in value set stored value + new value.

Thanks for your response,
Please provide me a quick blocks if possible so.
Actually value is in 8 decimal places
like 0.00002356
and adding to eight decimal places also

You have created 2 topics and are asking for blocks in both of them.

It might be best for you to learn the basics of Kodular and try things for yourself instead of asking for ready-made solutions.

1 Like

Forget it … you have blocks ready.
How Can I Learn Kodular from beginner to advanced level? - #7 by Rogerio_Rios

Sorry for that,
But I’m using app inventors for such long time and i have basic knowledge well

I was just pit a question only for logical solutions because I had tried for it but there was an issues
That’s why i ask a question in community

And ask for block image only for better understanding for me and other koders.

Thats it!

When user clicks the button for sum,
Call firebase with that particular tag

When firebase got value
Use label
Set label text to (get value+text box value)
Save firebase tag(same tag)
Value(label text)

Instead of label you can use any global variable.

1 Like

Why my data is delete automatically means when I store anything in firebase and after that I store one more time anything than the previous stored thing delete and new one come … I want. To store multiple tags

After getting firebase value , use either add items to the list or append to the list and save the new list into the firebase

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