# Dynamic cloud variables

**URL:** <https://community.thunkable.com/t/dynamic-cloud-variables/2679550>\
**Category:** Questions about Thunkable X\
**Tags:** firebase, help\
**Created:** [November 3, 2023, 10:54am UTC](https://community.thunkable.com/t/dynamic-cloud-variables/2679550 "2023-11-03T10:54:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nichtwichtig1719](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@nichtwichtig1719](https://community.thunkable.com/u/nichtwichtig1719)\
**Post date:** [November 3, 2023, 10:54am UTC](https://community.thunkable.com/t/dynamic-cloud-variables/2679550/1 "2023-11-03T10:54:23Z")

</div>

Hello everyone.  
I am trying to make an app right now where I have to create a cloud variable with text stored within another variable. And the first time I set it to something it works. but when I try to call the same variable again it stops working. Here are a few screenshots of my code.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/b/1b5e8065f5fce8993729b92a51f8bf4511286bc9.png)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/1/a139379fb0d229f2a8fa696bb3a7f592f18695a5.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/2/f2055d2ab34eacfb68d178fca11ab4530e62be72.png)  
Why is this as the name should always be the same right? why does it return null if it should actually return 1,Test,abc? Sorry I can’t put anymore pictures.

---

<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:** [November 3, 2023, 3:44pm UTC](https://community.thunkable.com/t/dynamic-cloud-variables/2679550/2 "2023-11-03T15:44:01Z")

</div>

The way you’ve set this up is a problem:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/9/797b8f3dfea7e1c3fb217e6993ce23eb7e2acb5e.png)

Let’s say your `app variable select` has the value “test”. By adding `app variable` in front of that, Thunkable is looking for a variable called “test” and trying to get its value and use that as the path in Firebase. But that variable called `app variable test` probably doesn’t exist.

You need to remove the `app variable " "` block. It should just read `set cloud variable app variable select to`.

![Screenshot 2023-11-03 at 8.40.50 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/5/a5372e914f03c8735f533fbe798ee50c97c434b6.png)

---

<div class="post-metadata">

**Author:** ![nichtwichtig1719](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@nichtwichtig1719](https://community.thunkable.com/u/nichtwichtig1719)\
**Post date:** [November 3, 2023, 4:29pm UTC](https://community.thunkable.com/t/dynamic-cloud-variables/2679550/3 "2023-11-03T16:29:58Z")

</div>

Did that and then I could click it but nothing happened. I used the app variable block to get the content in this case the name of the item stored in the select variable. This should theoretically then make a cloud variable with the name of the item. Also I want to be able to call that variable again later. Even after closing the app. But thank you for your reply.

---

<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:** [November 3, 2023, 5:43pm UTC](https://community.thunkable.com/t/dynamic-cloud-variables/2679550/4 "2023-11-03T17:43:41Z")

</div>

Can you post a screenshot of the updated blocks? I’m not sure you understood what I wrote and it would be good to double-check what you have before you keep working with cloud variables.

---

<div class="post-metadata">

**Author:** ![nichtwichtig1719](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@nichtwichtig1719](https://community.thunkable.com/u/nichtwichtig1719)\
**Post date:** [November 3, 2023, 7:37pm UTC](https://community.thunkable.com/t/dynamic-cloud-variables/2679550/5 "2023-11-03T19:37:56Z")

</div>

I indeed have double checked the original one and it still worked with the small issue. These are again screenshots of the updated code.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/2/124e2bc9c28331d7a2839a0ee0d753bdfc28d537.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/c/ec74039e4347dade69a5c7353111f7eaebd1b5aa.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:** [November 3, 2023, 9:36pm UTC](https://community.thunkable.com/t/dynamic-cloud-variables/2679550/6 "2023-11-03T21:36:34Z")

</div>

I’ll take your word that it’s working but I’ve rarely seen variables set up that way so that’s why I was skeptical. So the **value** of `app variable select` is actually the **name** of another variable? If so, then you’ve coded it correctly except that it seems you have used the blocks inconsistently… sometimes with `app variable` in front of that variable and sometimes not.

---

<div class="post-metadata">

**Author:** ![nichtwichtig1719](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@nichtwichtig1719](https://community.thunkable.com/u/nichtwichtig1719)\
**Post date:** [November 4, 2023, 7:47am UTC](https://community.thunkable.com/t/dynamic-cloud-variables/2679550/7 "2023-11-04T07:47:19Z")

</div>

> [@tatiang](#):
>
> So the **value** of `app variable select` is actually the **name** of another variable?

Yes and no. App variable select contains the name of the selected item. What I am trying to achieve is that I want to create a cloud variable with the name of the item, which is stored in app variable select. I then want to be able to save items in it, and when they open the app again or go back and select the **same** item again that they can see what they have put in that list.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [November 4, 2023, 9:54am UTC](https://community.thunkable.com/t/dynamic-cloud-variables/2679550/8 "2023-11-04T09:54:13Z")

</div>

Why aren’t you setting the value of select?

You are setting the value of a variable that has the name of the value held within select at the time of setting the variable

Set app variable

👆 Isn’t the same as the preconfigured setters that look like 👇

Set app variable variableName (no text input)

---

<div class="post-metadata">

**Author:** ![nichtwichtig1719](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@nichtwichtig1719](https://community.thunkable.com/u/nichtwichtig1719)\
**Post date:** [November 4, 2023, 10:51am UTC](https://community.thunkable.com/t/dynamic-cloud-variables/2679550/9 "2023-11-04T10:51:04Z")

</div>

What do you mean by

> [@jared](#):
>
> Why aren’t you setting the value of select?

? Because I am setting the value of select and it is the name of what the variable is supposed to be later. Thats also why I put it in the **Name** slot of the set variable block. I want the block to create a cloud variable that is stored on my firebase with the name of the item, which is contained in select. This variable (since it is a cloud variable) should be able to be called later the same way.

---

<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:** [February 2, 2024, 10:51am UTC](https://community.thunkable.com/t/dynamic-cloud-variables/2679550/10 "2024-02-02T10:51:28Z")

</div>

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