# How to make a code activate only 1 time no matter how many times you reopen the app?

**URL:** <https://community.thunkable.com/t/how-to-make-a-code-activate-only-1-time-no-matter-how-many-times-you-reopen-the-app/1919609>\
**Category:** Questions about Thunkable X\
**Tags:** design, beginner\
**Created:** [June 10, 2022, 1:41pm UTC](https://community.thunkable.com/t/how-to-make-a-code-activate-only-1-time-no-matter-how-many-times-you-reopen-the-app/1919609 "2022-06-10T13:41:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![201108sqz](https://avatars.discourse-cdn.com/v4/letter/2/8797f3/32.png) [@201108sqz](https://community.thunkable.com/u/201108sqz)\
**Post date:** [June 10, 2022, 1:41pm UTC](https://community.thunkable.com/t/how-to-make-a-code-activate-only-1-time-no-matter-how-many-times-you-reopen-the-app/1919609/1 "2022-06-10T13:41:27Z")

</div>

how to make a code activate only 1 time no matter how many times you reopen the app it just activates 1 time per device?  
my codes

 ![Screenshot (8)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/b/3b29c928af5cd313d983916993de3524eb4c81fc.jpeg)

---

<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:** [June 10, 2022, 3:08pm UTC](https://community.thunkable.com/t/how-to-make-a-code-activate-only-1-time-no-matter-how-many-times-you-reopen-the-app/1919609/2 "2022-06-10T15:08:05Z")

</div>

Have a spreadsheet row that looks like this:

[code] [used?]

Start with values like this:

12345 no

When the user enters a code, check if the 2nd column for that code is “no”. If it is, change it to “yes”. If it isn’t, then don’t allow them to use it.

That will allow that code to be used once across all devices (only once on a single device, then not on any other devices).

If you want the code to work once on every device, use a stored variable for the “used?” value instead.

---

<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:** [September 8, 2022, 3:08pm UTC](https://community.thunkable.com/t/how-to-make-a-code-activate-only-1-time-no-matter-how-many-times-you-reopen-the-app/1919609/3 "2022-09-08T15:08:43Z")

</div>

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