# How to create an unique ID in ignition

**URL:** <https://forum.inductiveautomation.com/t/how-to-create-an-unique-id-in-ignition/17489>\
**Category:** Ignition\
**Created:** [March 25, 2018, 2:06pm UTC](https://forum.inductiveautomation.com/t/how-to-create-an-unique-id-in-ignition/17489 "2018-03-25T14:06:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jorisherry](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jorisherry](https://forum.inductiveautomation.com/u/jorisherry)\
**Post date:** [March 25, 2018, 2:06pm UTC](https://forum.inductiveautomation.com/t/how-to-create-an-unique-id-in-ignition/17489/1 "2018-03-25T14:06:42Z")

</div>

I need to generate a unique trackid in ignition. At the moment i store this in a memory tag and after each read, i increase the value by 1, using the system.tag.read and write functions. My question is: is it possible for 2 scripts to read and write values at the same time? This breaks the uniqueness of the id. Is it possible to program a function which returns a unique id, and can be called from gateway and client?

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [March 25, 2018, 2:23pm UTC](https://forum.inductiveautomation.com/t/how-to-create-an-unique-id-in-ignition/17489/2 "2018-03-25T14:23:13Z")

</div>

You can use

```auto
import uuid
print uuid.uuid4()

```
