# How long does an object persist?

**URL:** <https://community.thunkable.com/t/how-long-does-an-object-persist/2153808>\
**Category:** Questions about Thunkable X\
**Tags:** objects\
**Created:** [November 28, 2022, 4:43pm UTC](https://community.thunkable.com/t/how-long-does-an-object-persist/2153808 "2022-11-28T16:43:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![finbarr.mccarthytl32](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@finbarr.mccarthytl32](https://community.thunkable.com/u/finbarr.mccarthytl32)\
**Post date:** [November 28, 2022, 4:43pm UTC](https://community.thunkable.com/t/how-long-does-an-object-persist/2153808/1 "2022-11-28T16:43:48Z")

</div>

How long does an object persist, i.e. if I create an object on one screen, can I refer to it on another screen?

For example, I retrieve data from a database and store it in an object on one screen. I can of course save the data from the object to variables or to local storage, to allow it to be used on any screen, but can I cut out this step and refer to the object on another screen?

---

<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 28, 2022, 5:05pm UTC](https://community.thunkable.com/t/how-long-does-an-object-persist/2153808/2 "2022-11-28T17:05:52Z")

</div>

What do you mean by an object? Using the `create object` block? Can you give an example? Any value you want to re-use needs to be stored in a variable, local database or cloud database.

---

<div class="post-metadata">

**Author:** ![finbarr.mccarthytl32](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@finbarr.mccarthytl32](https://community.thunkable.com/u/finbarr.mccarthytl32)\
**Post date:** [November 28, 2022, 6:25pm UTC](https://community.thunkable.com/t/how-long-does-an-object-persist/2153808/3 "2022-11-28T18:25:58Z")

</div>

Yes - the create object block. If I create it on one screen, can I refer to elements of that object block on another screen.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/5/4500527fead5c1469abf5c73ef91880e6cdea6f0.png)  
Assume that I have connected to a database, retrieved the record\_id from the database which is stored in the object.  
If this is used on one screen, can I refer to the object element fromDB.record\_id on another screen using a get property block?

---

<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 28, 2022, 9:13pm UTC](https://community.thunkable.com/t/how-long-does-an-object-persist/2153808/4 "2022-11-28T21:13:43Z")

</div>

Yes, as long as you are getting/setting the object properties using **variable** (and object) blocks. In your screenshot, your object “lives” in `app variable fromDB`. So that’s the variable you can use. The object doesn’t exist outside of that variable.

---

<div class="post-metadata">

**Author:** ![finbarr.mccarthytl32](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@finbarr.mccarthytl32](https://community.thunkable.com/u/finbarr.mccarthytl32)\
**Post date:** [November 29, 2022, 8:31am UTC](https://community.thunkable.com/t/how-long-does-an-object-persist/2153808/5 "2022-11-29T08:31:26Z")

</div>

Thank you Tatiang

---

<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 27, 2023, 8:31am UTC](https://community.thunkable.com/t/how-long-does-an-object-persist/2153808/6 "2023-02-27T08:31:46Z")

</div>

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