# Prevent duplicate entries

**URL:** https://community.glideapps.com/t/prevent-duplicate-entries/13146
**Category:** Ask for Help
**Created:** [July 27, 2020, 7:19am UTC](https://community.glideapps.com/t/prevent-duplicate-entries/13146 "2020-07-27T07:19:28Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Annie](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/annie/32/11232_2.png) [@Annie](https://community.glideapps.com/u/Annie)
#### Post date: [July 27, 2020, 7:19am UTC](https://community.glideapps.com/t/prevent-duplicate-entries/13146/1 "2020-07-27T07:19:28Z")

</div>

I have created a small app for marking students attendance in a physical class. This is to be used by a teacher teaching in a slum cluster. I am able to select the date and mark bunch of students as present or absent.  
How do I prevent duplicate entries on the same date i.e how do I ensure unique entries in the date column?

Thanks a lot

---

<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: [July 27, 2020, 8:02am UTC](https://community.glideapps.com/t/prevent-duplicate-entries/13146/2 "2020-07-27T08:02:23Z")

</div>

Hi Annie, may I ask how many students do you have for this class and is this expected to change in the future?

---

<div class="post-metadata">

### Author: ![Annie](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/annie/32/11232_2.png) [@Annie](https://community.glideapps.com/u/Annie)
#### Post date: [July 27, 2020, 8:44am UTC](https://community.glideapps.com/t/prevent-duplicate-entries/13146/3 "2020-07-27T08:44:38Z")

</div>

Yes, the nos. could change. However, I have kept the change as manual update to the Google sheets as my competence with Glideapps was basic. So used an example I saw and created columns with names of the students and their attendance status as True or False. The date is the first column.  
Thanks

---

<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: [July 27, 2020, 8:46am UTC](https://community.glideapps.com/t/prevent-duplicate-entries/13146/4 "2020-07-27T08:46:08Z")

</div>

Yeah that would be my approach as well, so if the teacher wants to check attendance for a new date, you can add a new form with a date picker for the date column, then a checkbox for all other columns of student names, providing you don’t have too many students in the class then it should work.

---

<div class="post-metadata">

### Author: ![Annie](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/annie/32/11232_2.png) [@Annie](https://community.glideapps.com/u/Annie)
#### Post date: [July 27, 2020, 9:01am UTC](https://community.glideapps.com/t/prevent-duplicate-entries/13146/5 "2020-07-27T09:01:53Z")

</div>

So the teacher can’t accidentally enter the same date again in the date picker and end with 2 sets of records for the same date?

---

<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: [July 27, 2020, 9:05am UTC](https://community.glideapps.com/t/prevent-duplicate-entries/13146/6 "2020-07-27T09:05:50Z")

</div>

If you want to prevent that, the date must be written to a column in the tab that you have the form button. Let’s say the “Home” tab for example.

Create a relation matching that date choice column’s value back to the date column in the “Attendance” sheet. If the relation is not empty (the teacher has chosen a date that duplicates) then don’t show the button (via a conditional visibility linked with the button), else show the button.

---

<div class="post-metadata">

### Author: ![Annie](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/annie/32/11232_2.png) [@Annie](https://community.glideapps.com/u/Annie)
#### Post date: [July 27, 2020, 9:48am UTC](https://community.glideapps.com/t/prevent-duplicate-entries/13146/7 "2020-07-27T09:48:44Z")

</div>

Many many thanks, will try this out.

---

<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: [July 27, 2020, 10:02am UTC](https://community.glideapps.com/t/prevent-duplicate-entries/13146/8 "2020-07-27T10:02:30Z")

</div>

Let me know if I can help, forgot to tell you that after the initial choice of date, you can later catch it via the Columns component to write to the Date.
