# \[Solved\] To add Unique records to new table

**URL:** https://community.thunkable.com/t/solved-to-add-unique-records-to-new-table/1660137
**Category:** Questions about Thunkable X
**Tags:** solved
**Created:** [December 25, 2021, 5:46am UTC](https://community.thunkable.com/t/solved-to-add-unique-records-to-new-table/1660137 "2021-12-25T05:46:52Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![naitikjain99wz6mu](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@naitikjain99wz6mu](https://community.thunkable.com/u/naitikjain99wz6mu)
#### Post date: [December 25, 2021, 5:46am UTC](https://community.thunkable.com/t/solved-to-add-unique-records-to-new-table/1660137/1 "2021-12-25T05:46:53Z")

</div>

Hello Thunkers!  
How can we add only unique records to a table.

 ![WhatsApp Image 2021-12-24 at 21.48.10](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/f/ff3ef06f378baea532b8300c4610920917d322ba.jpeg)

The image above has following textboxes. The textboxes in circled area are client data. The unique value in this textbox is GSTIN number, which is also a searchbox.  
Now what I want is, if client is new, admin has to manually type the data. This data has to be stored in two tables i.e., Order Report and Client Report.  
Now client report table should only add record if gstin number is unique i.e., there has to be no other records with same gstin number.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/d/1d717ae7f8be5ee8069b54e1f6e8695bb35f526b.png)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/4/147b7060ac45bb766a594b3bf25c574a36fcb652.jpeg)

---

<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: [December 25, 2021, 10:03am UTC](https://community.thunkable.com/t/solved-to-add-unique-records-to-new-table/1660137/2 "2021-12-25T10:03:27Z")

</div>

When you say **unique** , do you mean to check for no duplicates?

The code that you are showing makes a list of GSTIN in Client\_Report table but remember that this is done when you start the app so it will be correct for the first entry. If you try to check for the same client again then you will still find it as new.

---

<div class="post-metadata">

### Author: ![naitikjain99wz6mu](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@naitikjain99wz6mu](https://community.thunkable.com/u/naitikjain99wz6mu)
#### Post date: [December 25, 2021, 6:14pm UTC](https://community.thunkable.com/t/solved-to-add-unique-records-to-new-table/1660137/3 "2021-12-25T18:14:22Z")

</div>

Yes, there should be no duplications of same client in client report table.  
After adding first item it does exactly you stated!

---

<div class="post-metadata">

### Author: ![naitikjain99wz6mu](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@naitikjain99wz6mu](https://community.thunkable.com/u/naitikjain99wz6mu)
#### Post date: [December 26, 2021, 5:31pm UTC](https://community.thunkable.com/t/solved-to-add-unique-records-to-new-table/1660137/4 "2021-12-26T17:31:16Z")

</div>

?? No one to help me out? Or should I be more clear?

---

<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: [December 26, 2021, 6:07pm UTC](https://community.thunkable.com/t/solved-to-add-unique-records-to-new-table/1660137/5 "2021-12-26T18:07:30Z")

</div>

You can search the data source for the client name and use an if/else block to create a new record only if the name does not exist.

Which part do you need help with?

---

<div class="post-metadata">

### Author: ![naitikjain99wz6mu](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@naitikjain99wz6mu](https://community.thunkable.com/u/naitikjain99wz6mu)
#### Post date: [December 27, 2021, 4:19am UTC](https://community.thunkable.com/t/solved-to-add-unique-records-to-new-table/1660137/6 "2021-12-27T04:19:51Z")

</div>

Searching part is done. All I need is adding record into the table.

---

<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: [December 27, 2021, 7:06am UTC](https://community.thunkable.com/t/solved-to-add-unique-records-to-new-table/1660137/7 "2021-12-27T07:06:33Z")

</div>

You need to add a block like this  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/3/9348f841e2c8b2e6dfe6d83eedbfc5a6d08e993b.png)

In here  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/1/f13c0380f1109178c7f513aeb0578f5032190416.png)

This should fix the issue.

---

<div class="post-metadata">

### Author: ![naitikjain99wz6mu](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@naitikjain99wz6mu](https://community.thunkable.com/u/naitikjain99wz6mu)
#### Post date: [December 27, 2021, 4:14pm UTC](https://community.thunkable.com/t/solved-to-add-unique-records-to-new-table/1660137/8 "2021-12-27T16:14:45Z")

</div>

Thank you Sir! 😄

---

<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: [March 27, 2022, 4:15pm UTC](https://community.thunkable.com/t/solved-to-add-unique-records-to-new-table/1660137/9 "2022-03-27T16:15:44Z")

</div>

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