# \[Sovled\] Update Cloud Variables at same time?

**URL:** <https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599>\
**Category:** Questions about Thunkable X\
**Tags:** solved\
**Created:** [March 28, 2020, 10:17am UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599 "2020-03-28T10:17:09Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leito](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@Leito](https://community.thunkable.com/u/Leito)\
**Post date:** [March 28, 2020, 10:17am UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/1 "2020-03-28T10:17:10Z")

</div>

Hi! I m working with Realtime DataBase and cloud variables… But I m having a problem, when two users get or save a variable at the same time, they overlap each other.  
I have to find a way to update the cloud variable like adding an item to a list (LIKE insert at first/last) Is that possible with a cloud variable?

---

<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:** [March 28, 2020, 4:05pm UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/2 "2020-03-28T16:05:41Z")

</div>

Hey @Leito 👋

> [@Leito](#):
>
> they overlap each other.

I haven’t tried this myself, but surely one variable would end up being _the_ variable, no?

Are you saying User A sees Variable B and that User B sees Variable A?

---

<div class="post-metadata">

**Author:** ![Leito](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@Leito](https://community.thunkable.com/u/Leito)\
**Post date:** [March 28, 2020, 4:11pm UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/3 "2020-03-28T16:11:53Z")

</div>

For example, If both users click at the same time, both get the same value, = 70 for example

and if the automatic operation is value + 1 both will save the result of 70 + 1

the global result is going to be 71 instead of 72…  
thanks!

---

<div class="post-metadata">

**Author:** ![Leito](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@Leito](https://community.thunkable.com/u/Leito)\
**Post date:** [March 28, 2020, 10:10am UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/4 "2020-03-28T10:10:10Z")

</div>

Hi Jane, I m working with Cloud variables but I m having a problem… when 2 users click at the same time, the update the same value… How can I fix that?

---

<div class="post-metadata">

**Author:** ![sysads](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/sysads/32/44975_2.png) [@sysads](https://community.thunkable.com/u/sysads)\
**Post date:** [March 28, 2020, 11:54am UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/5 "2020-03-28T11:54:43Z")

</div>

Hmm interesting scenario. Are you storing each like values locally first before updating the cloud variables in case user internet connection drops?

---

<div class="post-metadata">

**Author:** ![Leito](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@Leito](https://community.thunkable.com/u/Leito)\
**Post date:** [March 28, 2020, 3:39pm UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/6 "2020-03-28T15:39:16Z")

</div>

Thanks for your help! thats a very important detail but, also storing values in local storage first, if the clicks are done at the same time, the result will be the same (  
For example, both get the acttually value = 70, (70+1) then both save, the new cloud value is 71 instead of 72… I think that a possible solution would be if I could “insert at first/last” in the cloud list so updates never overlap.  
Its that possible??

---

<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:** [March 28, 2020, 5:00pm UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/7 "2020-03-28T17:00:17Z")

</div>

> [@Leito](#):
>
> Hi Jane, I m working with Cloud variables

@Leito - please don’t post about the same thing in multiple topics.

I’m merged your posts into a single topic.

---

<div class="post-metadata">

**Author:** ![Leito](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@Leito](https://community.thunkable.com/u/Leito)\
**Post date:** [March 29, 2020, 5:15pm UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/8 "2020-03-29T17:15:48Z")

</div>

I kept tryng with many different things and I found a solution!! and very simple!

 ![2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/1/b19a6e0672742bbf693f11a64cf52e79f79c7bc8.png)

Although the click be simultaneous, with these blocks the information will never overlap.

---

<div class="post-metadata">

**Author:** ![Leito](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@Leito](https://community.thunkable.com/u/Leito)\
**Post date:** [March 27, 2020, 7:59pm UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/9 "2020-03-27T19:59:30Z")

</div>

Could you give me an example please?!

---

<div class="post-metadata">

**Author:** ![Leito](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@Leito](https://community.thunkable.com/u/Leito)\
**Post date:** [March 27, 2020, 8:59pm UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/10 "2020-03-27T20:59:01Z")

</div>

I dont want to be annoying but I have a similar problem, I need to save and get cloud variables to vinculate different users, but I need to conect only 2 users… so I get the values and the I set the variable to null but if many users click at the same time all of them get the variable, so

How can I do? Thanks!

---

<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:** [March 29, 2020, 4:48pm UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/11 "2020-03-29T16:48:20Z")

</div>

@Leito is this related to this topic?

> [@\[Sovled\] Update Cloud Variables at same time?](http://community.thunkable.com/t/cloud-variables-update-at-same-time-how-to-fix/540599):
>
> Hi! I m working with Realtime DataBase and cloud variables… But I m having a problem, when two users get or save a variable at the same time, they overlap each other. I have to find a way to update the cloud variable like adding an item to a list (LIKE insert at first/last) Is that possible with a cloud variable?

---

<div class="post-metadata">

**Author:** ![Leito](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@Leito](https://community.thunkable.com/u/Leito)\
**Post date:** [March 29, 2020, 5:19pm UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/12 "2020-03-29T17:19:58Z")

</div>

Yes, sory about the “Spam”  
I don’t bother anymore. I could find a solution!!  
I ve also found a bug with “In list remove #” with cloud variables, no matter which number you put, always will delete the last object was insert, also when you insert them, always will be inserted at last, they will always be inserted last even if you put insert at first. The solution to this if you want to remove a specific object, “In list set #” . With that block I could set any number to null and delete specific objects

---

<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:** [March 29, 2020, 5:22pm UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/13 "2020-03-29T17:22:22Z")

</div>

> [@Leito](#):
>
> I found a solution!!

Glad to hear it!

> [@Leito](#):
>
> Yes, sory about the “Spam”

Thanks, I’ve merged them into a single post now

---

<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:** [March 29, 2020, 7:49pm UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/14 "2020-03-29T19:49:29Z")

</div>

> [@Leito](#):
>
> ve also found a bug with “In list remove #” with cloud variables, no matter which number you put, always will delete the

I would disagree with this statement. Check out my blog post app NestdList [here](http://jaredgibb.xyz/index.php/blog/)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/c/bc0507ebbd643903de07a791d99ecac2df944e07.jpeg)

I manipulate cloud list items using the in list get/remove # blocks

---

<div class="post-metadata">

**Author:** ![Leito](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@Leito](https://community.thunkable.com/u/Leito)\
**Post date:** [March 29, 2020, 8:04pm UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/15 "2020-03-29T20:04:45Z")

</div>

Thanks!! Nice blog!!!

---

<div class="post-metadata">

**Author:** ![itzvinie](https://avatars.discourse-cdn.com/v4/letter/i/eb9ed0/32.png) [@itzvinie](https://community.thunkable.com/u/itzvinie)\
**Post date:** [October 23, 2021, 4:40am UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/16 "2021-10-23T04:40:54Z")

</div>

I think this link is expired,can you please help with the you made to this Post again

---

<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:** [October 25, 2021, 4:39am UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/17 "2021-10-25T04:39:23Z")

</div>

Yikes! I don’t run this website anymore but am still doing coaching. I may just ship out some new Thunkable examples soon!

I do offer coaching classes if you’re interested

> **Learn more**
>
> Tired of struggling with databases and API’s? Need a little functionality that’s not available yet thru current blocks? Experience your own bootcamp! Are you ready to step-it-up or speed it along? Need some custom code integrated? Contact me today to learn how to book a 1-on-1 coaching session or yet freelance building support!
> 
> Office Hours:  
> Mon - Fri  
> 9:00 AM - 5:00 PM ESt
> 
> Send me a message today:  
> [Jared@KnowCodeConsultants.com](mailto:Jared@KnowCodeConsultants.com)

---

<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:30am UTC](https://community.thunkable.com/t/sovled-update-cloud-variables-at-same-time/540599/18 "2024-11-08T11:30:00Z")

</div>


