# How to change existing Firebase value?

**URL:** https://community.thunkable.com/t/how-to-change-existing-firebase-value/2749617
**Category:** Questions about Thunkable X
**Tags:** firebase, cloud-variable
**Created:** [December 13, 2023, 11:46pm UTC](https://community.thunkable.com/t/how-to-change-existing-firebase-value/2749617 "2023-12-13T23:46:42Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![luiz.primaz2ddpyu](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@luiz.primaz2ddpyu](https://community.thunkable.com/u/luiz.primaz2ddpyu)
#### Post date: [December 13, 2023, 11:46pm UTC](https://community.thunkable.com/t/how-to-change-existing-firebase-value/2749617/1 "2023-12-13T23:46:42Z")

</div>

Hello, how do I change an existing value? Example: In the app the user could change the email, but I’m not able to change the value in firebase

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [December 14, 2023, 1:18am UTC](https://community.thunkable.com/t/how-to-change-existing-firebase-value/2749617/2 "2023-12-14T01:18:13Z")

</div>

Why would you change a user’s email address in Firebase? The user should manage any changes to their email address or password.

---

<div class="post-metadata">

### Author: ![luiz.primaz2ddpyu](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@luiz.primaz2ddpyu](https://community.thunkable.com/u/luiz.primaz2ddpyu)
#### Post date: [December 14, 2023, 10:51am UTC](https://community.thunkable.com/t/how-to-change-existing-firebase-value/2749617/4 "2023-12-14T10:51:18Z")

</div>

It was just an example, not necessarily the email, it could be any other information. I just want to know how to change existing information.

---

<div class="post-metadata">

### Author: ![luiz.primaz2ddpyu](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@luiz.primaz2ddpyu](https://community.thunkable.com/u/luiz.primaz2ddpyu)
#### Post date: [December 14, 2023, 5:41pm UTC](https://community.thunkable.com/t/how-to-change-existing-firebase-value/2749617/5 "2023-12-14T17:41:36Z")

</div>

I just want to change an existing value, you know? Example: change January to February:

```auto
{
  "usuarios": {
    "Hxgh24uNvjcg628ITy6mzzXl54s1": {
      "Mes": "January"
    }
  }
}

```

```auto
{
  "usuarios": {
    "Hxgh24uNvjcg628ITy6mzzXl54s1": {
      "Mes": "February"
    }
  }
}

```

All this in firebase, I just want to know how do I change a value.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [December 14, 2023, 5:46pm UTC](https://community.thunkable.com/t/how-to-change-existing-firebase-value/2749617/6 "2023-12-14T17:46:27Z")

</div>

**Set cloud variable usruarios/[app variable userId]/Mes to “February”**

I’m assuming that usruarios is the top level of your Firebase database. If not, you need to use the full path to it. I’m also assuming that Hxgh24uNvjcg628ITy6mzzXl54s1 is your userId value from Firebase Sign In. If not, then you would need to replace that in the path I provided above.

---

<div class="post-metadata">

### Author: ![luiz.primaz2ddpyu](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@luiz.primaz2ddpyu](https://community.thunkable.com/u/luiz.primaz2ddpyu)
#### Post date: [December 14, 2023, 6:05pm UTC](https://community.thunkable.com/t/how-to-change-existing-firebase-value/2749617/7 "2023-12-14T18:05:00Z")

</div>

Nothing happens

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/c/4cd3193bc72945f070f8e8837dfc464820f7db1a.png)

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [December 14, 2023, 6:22pm UTC](https://community.thunkable.com/t/how-to-change-existing-firebase-value/2749617/8 "2023-12-14T18:22:33Z")

</div>

Okay… is it possible your Firebase rules are incorrect? Are you signed in to that userId when you test this?

And what does your Firebase data structure look like? Is there anything above “usuarios”?

Can you get a value _from_ Firebase as a test? If not, your rules are probably preventing that.

---

<div class="post-metadata">

### Author: ![luiz.primaz2ddpyu](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@luiz.primaz2ddpyu](https://community.thunkable.com/u/luiz.primaz2ddpyu)
#### Post date: [December 14, 2023, 6:31pm UTC](https://community.thunkable.com/t/how-to-change-existing-firebase-value/2749617/9 "2023-12-14T18:31:59Z")

</div>

These are my rules and there is nothing above usuarios, but I log in on userID

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/e/2e2c48fe755d746a33b478f5c03e3d81369d34ab.png)

---

<div class="post-metadata">

### Author: ![luiz.primaz2ddpyu](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@luiz.primaz2ddpyu](https://community.thunkable.com/u/luiz.primaz2ddpyu)
#### Post date: [December 14, 2023, 6:36pm UTC](https://community.thunkable.com/t/how-to-change-existing-firebase-value/2749617/10 "2023-12-14T18:36:20Z")

</div>

JSON:

```auto
{
  "usuarios": {
    "ldKhPuC9ccZelOICyIkga5trLrr2": {
      "Ano": "2023",
      "Celular": "312312312312312",
      "Dia": "1",
      "Email": "fulano@gmail.com",
      "Mes": "11",
      "Nome": "Fulano",
      "Porque": "Não gosto",
      "Problema": "Cigarro eletrônico",
      "Sobrenome": "fulano"
    }
  }
}

```

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [December 14, 2023, 7:00pm UTC](https://community.thunkable.com/t/how-to-change-existing-firebase-value/2749617/11 "2023-12-14T19:00:44Z")

</div>

That should work. Did you create the Firebase database less than 30 days ago? After 30 days, those rules will fail and you will need more secure rules.

Have you double-checked that the green `userId` block’s value matches what you have in Firebase?

> [@tatiang](#):
>
> Can you get a value _from_ Firebase as a test? If not, your rules are probably preventing that.

That is, what happens if you assign the cloud variable to a label’s text? Show your blocks for that and explain the result.

---

<div class="post-metadata">

### Author: ![luiz.primaz2ddpyu](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@luiz.primaz2ddpyu](https://community.thunkable.com/u/luiz.primaz2ddpyu)
#### Post date: [December 14, 2023, 7:06pm UTC](https://community.thunkable.com/t/how-to-change-existing-firebase-value/2749617/12 "2023-12-14T19:06:24Z")

</div>

I created today

---

<div class="post-metadata">

### Author: ![luiz.primaz2ddpyu](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@luiz.primaz2ddpyu](https://community.thunkable.com/u/luiz.primaz2ddpyu)
#### Post date: [January 2, 2024, 10:36pm UTC](https://community.thunkable.com/t/how-to-change-existing-firebase-value/2749617/13 "2024-01-02T22:36:18Z")

</div>

And would it work to delete the user’s account and recreate their account, only with the information changed. I was thinking, maybe right, but I don’t know how to do it.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [January 2, 2024, 11:22pm UTC](https://community.thunkable.com/t/how-to-change-existing-firebase-value/2749617/14 "2024-01-02T23:22:44Z")

</div>

You can do that. It might be easier to just change the necessary information but sure, you could recreate the entire data structure for usuarios/[userId] each time you need to make a change. But if you can’t make a change at all to your Firebase data, I don’t see how that will help you.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [April 1, 2024, 11:23pm UTC](https://community.thunkable.com/t/how-to-change-existing-firebase-value/2749617/15 "2024-04-01T23:23:40Z")

</div>

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