# How to assign a unique coupon code in airtable and display it on thunkable.?

**URL:** https://community.thunkable.com/t/how-to-assign-a-unique-coupon-code-in-airtable-and-display-it-on-thunkable/1094061
**Category:** Questions about Thunkable X
**Tags:** beginner
**Created:** [February 12, 2021, 1:44pm UTC](https://community.thunkable.com/t/how-to-assign-a-unique-coupon-code-in-airtable-and-display-it-on-thunkable/1094061 "2021-02-12T13:44:24Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![mounikaperumalla007y](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@mounikaperumalla007y](https://community.thunkable.com/u/mounikaperumalla007y)
#### Post date: [February 12, 2021, 1:44pm UTC](https://community.thunkable.com/t/how-to-assign-a-unique-coupon-code-in-airtable-and-display-it-on-thunkable/1094061/1 "2021-02-12T13:44:24Z")

</div>

Iam creating a form for students, whomever the student had filled their details…coupon code should appear on the screen… Please help me out in this… how to write a code for this.?

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [February 13, 2021, 5:45am UTC](https://community.thunkable.com/t/how-to-assign-a-unique-coupon-code-in-airtable-and-display-it-on-thunkable/1094061/2 "2021-02-13T05:45:10Z")

</div>

There are many ways to achieve this. The easiest is to save the record (row) then get the row ID and use it as a coupon. The row ID in Airtable is always unique.

---

<div class="post-metadata">

### Author: ![gm\_shack](https://avatars.discourse-cdn.com/v4/letter/g/c5a1d2/32.png) [@gm\_shack](https://community.thunkable.com/u/gm_shack)
#### Post date: [February 13, 2021, 12:07pm UTC](https://community.thunkable.com/t/how-to-assign-a-unique-coupon-code-in-airtable-and-display-it-on-thunkable/1094061/3 "2021-02-13T12:07:39Z")

</div>

Hey @mounikaperumalla007y you can fill all the coupon codes in every single column and row and you can randomly call a column and row and then show it on a label

---

<div class="post-metadata">

### Author: ![mounikaperumalla007y](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@mounikaperumalla007y](https://community.thunkable.com/u/mounikaperumalla007y)
#### Post date: [February 15, 2021, 12:06pm UTC](https://community.thunkable.com/t/how-to-assign-a-unique-coupon-code-in-airtable-and-display-it-on-thunkable/1094061/6 "2021-02-15T12:06:41Z")

</div>

Can you please help me out with the blocks to be used in this case…

Sir, i do have separate list of coupon codes… I should use only those codes…

Sir, I got your point…Each cell in the airtable does have a unique i.d, whenever we represent the i.d the value of the cell will be displayed on thunkable…can you please help me with the coding blocks sir…

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [February 15, 2021, 2:13pm UTC](https://community.thunkable.com/t/how-to-assign-a-unique-coupon-code-in-airtable-and-display-it-on-thunkable/1094061/7 "2021-02-15T14:13:05Z")

</div>

I’m not sure who are you referring to but let me explain the setup as I understood it.

You need 2 tables at minimum to do this task, A table for your students info and another table for the coupon codes.

Whenever any student registers in the app, you will save the student details along with one of the coupons which your app selected from the coupon table. Once the new registered student info is saved successfully, you will go to the coupon table and remove that coupon. This step is required to avoid using the same coupon more than once.

This is how I understood your requirement. If this is not correct, please correct it.

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [February 15, 2021, 6:34pm UTC](https://community.thunkable.com/t/how-to-assign-a-unique-coupon-code-in-airtable-and-display-it-on-thunkable/1094061/8 "2021-02-15T18:34:02Z")

</div>

I have made a quick project to show the idea. The project is not complete and might have error but it will clarify the process.

[https://x.thunkable.com/projectPage/602a8832b8d4970191dee660](https://x.thunkable.com/projectPage/602a8832b8d4970191dee660)

---

<div class="post-metadata">

### Author: ![mounikaperumalla007y](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@mounikaperumalla007y](https://community.thunkable.com/u/mounikaperumalla007y)
#### Post date: [February 16, 2021, 10:37am UTC](https://community.thunkable.com/t/how-to-assign-a-unique-coupon-code-in-airtable-and-display-it-on-thunkable/1094061/9 "2021-02-16T10:37:02Z")

</div>

Thank you for the link sir. I will implement and consult you for further clarification sir.

---

<div class="post-metadata">

### Author: ![mounikaperumalla007y](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@mounikaperumalla007y](https://community.thunkable.com/u/mounikaperumalla007y)
#### Post date: [February 17, 2021, 10:17am UTC](https://community.thunkable.com/t/how-to-assign-a-unique-coupon-code-in-airtable-and-display-it-on-thunkable/1094061/10 "2021-02-17T10:17:30Z")

</div>

Sir, may i know the design components you have used, rather than buttons and labels…

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [February 17, 2021, 10:50am UTC](https://community.thunkable.com/t/how-to-assign-a-unique-coupon-code-in-airtable-and-display-it-on-thunkable/1094061/11 "2021-02-17T10:50:10Z")

</div>

Hello,

- Buttons
- Labels
- Two tables which can be Airtable (I used Local Storage) for simplicity but both works the same.

> One table for the student data  
> One table used as a list for coupons.

Everything else is in the blocks (codes).

---

<div class="post-metadata">

### Author: ![mounikaperumalla007y](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@mounikaperumalla007y](https://community.thunkable.com/u/mounikaperumalla007y)
#### Post date: [February 18, 2021, 4:10am UTC](https://community.thunkable.com/t/how-to-assign-a-unique-coupon-code-in-airtable-and-display-it-on-thunkable/1094061/12 "2021-02-18T04:10:34Z")

</div>

ok, sir.Thank u so much, sir. I will let you know if there any doubts further sir…

---

<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:29pm UTC](https://community.thunkable.com/t/how-to-assign-a-unique-coupon-code-in-airtable-and-display-it-on-thunkable/1094061/13 "2024-11-08T13:29:25Z")

</div>


