# How to add rows to a second table only if the email doesn’t already exist?

**URL:** https://community.glideapps.com/t/how-to-add-rows-to-a-second-table-only-if-the-email-doesn-t-already-exist/84331
**Category:** Ask for Help
**Created:** [September 11, 2025, 3:52pm UTC](https://community.glideapps.com/t/how-to-add-rows-to-a-second-table-only-if-the-email-doesn-t-already-exist/84331 "2025-09-11T15:52:48Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![happything](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/happything/32/91508_2.png) [@happything](https://community.glideapps.com/u/happything)
#### Post date: [September 11, 2025, 3:52pm UTC](https://community.glideapps.com/t/how-to-add-rows-to-a-second-table-only-if-the-email-doesn-t-already-exist/84331/1 "2025-09-11T15:52:48Z")

</div>

Hi everyone,

In my app, I’m using a **Form Screen** where users enter their information.

- When a new row is added to **Table A** (with Email and some details),
- I’d also like the same information to be added to **Table B**.
- However, if the email already exists in **Table B** , then I don’t want to create a duplicate row there.
- **Table A should always save the new row.**

Is there a good way to structure this workflow so that duplicates are prevented in Table B but Table A continues to collect all submissions?

Thanks in advance for your suggestions!

---

<div class="post-metadata">

### Author: ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)
#### Post date: [September 11, 2025, 7:15pm UTC](https://community.glideapps.com/t/how-to-add-rows-to-a-second-table-only-if-the-email-doesn-t-already-exist/84331/2 "2025-09-11T19:15:59Z")

</div>

You could use query column to get the rows where email is current email field (I suggest you to make your form in a helper table). If is empty, then you can add it.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [September 12, 2025, 12:11am UTC](https://community.glideapps.com/t/how-to-add-rows-to-a-second-table-only-if-the-email-doesn-t-already-exist/84331/3 "2025-09-12T00:11:00Z")

</div>

May we know the use case for adding some sort of the same info for table B? We might be able to suggest an alternative in data structure for you.

---

<div class="post-metadata">

### Author: ![happything](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/happything/32/91508_2.png) [@happything](https://community.glideapps.com/u/happything)
#### Post date: [September 12, 2025, 12:23am UTC](https://community.glideapps.com/t/how-to-add-rows-to-a-second-table-only-if-the-email-doesn-t-already-exist/84331/4 "2025-09-12T00:23:00Z")

</div>

I’m building a reservation session, and I’d like the user data registered for that session to also be added to a **User table** that controls access to the page.

The user data consists of **name, email, phone number, and team name**.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [September 12, 2025, 2:16am UTC](https://community.glideapps.com/t/how-to-add-rows-to-a-second-table-only-if-the-email-doesn-t-already-exist/84331/5 "2025-09-12T02:16:51Z")

</div>

So is it correct to assume this is a public app and users are not required to log in at all?
