# Local Vars for Clones

**URL:** https://community.thunkable.com/t/local-vars-for-clones/1380286
**Category:** Questions about Thunkable X
**Created:** [July 5, 2021, 4:28pm UTC](https://community.thunkable.com/t/local-vars-for-clones/1380286 "2021-07-05T16:28:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jonathonschnoor6x4b5](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jonathonschnoor6x4b5/32/112262_2.png) [@jonathonschnoor6x4b5](https://community.thunkable.com/u/jonathonschnoor6x4b5)
#### Post date: [July 5, 2021, 4:28pm UTC](https://community.thunkable.com/t/local-vars-for-clones/1380286/1 "2021-07-05T16:28:51Z")

</div>

Hey, so I’m wanting to use local vars for some clones I have, to determine which line I need to use in my database. Basically, every time I create a sprite on my canvas, I want each one to have its own ID associated with a row in my database. But here’s the catch: there might be a lot of clones, and I obviously can’t just make a ton of app variables and hope for the best. Anyone have a solution?

---

<div class="post-metadata">

### Author: ![sketch](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/sketch/32/109058_2.png) [@sketch](https://community.thunkable.com/u/sketch)
#### Post date: [July 5, 2021, 4:39pm UTC](https://community.thunkable.com/t/local-vars-for-clones/1380286/2 "2021-07-05T16:39:26Z")

</div>

You could use Dynamic Variables

---

<div class="post-metadata">

### Author: ![jonathonschnoor6x4b5](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jonathonschnoor6x4b5/32/112262_2.png) [@jonathonschnoor6x4b5](https://community.thunkable.com/u/jonathonschnoor6x4b5)
#### Post date: [July 5, 2021, 5:18pm UTC](https://community.thunkable.com/t/local-vars-for-clones/1380286/3 "2021-07-05T17:18:08Z")

</div>

The problem is that each clone needs its own value that doesn’t change.

---

<div class="post-metadata">

### Author: ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)
#### Post date: [July 5, 2021, 6:33pm UTC](https://community.thunkable.com/t/local-vars-for-clones/1380286/4 "2021-07-05T18:33:19Z")

</div>

I’d record each Sprite’s ID when you create it, in a local DB.

---

<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, 1:19pm UTC](https://community.thunkable.com/t/local-vars-for-clones/1380286/5 "2024-11-08T13:19:57Z")

</div>


