# Conditional Date & Count Match

**URL:** <https://community.glideapps.com/t/conditional-date-count-match/25018>\
**Category:** Ask for Help\
**Created:** [April 1, 2021, 3:26pm UTC](https://community.glideapps.com/t/conditional-date-count-match/25018 "2021-04-01T15:26:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Canup](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daniel_canup/32/32850_2.png) [@Daniel\_Canup](https://community.glideapps.com/u/Daniel_Canup)\
**Post date:** [April 1, 2021, 3:26pm UTC](https://community.glideapps.com/t/conditional-date-count-match/25018/1 "2021-04-01T15:26:52Z")

</div>

Hey guys, I would like to ask for some assistance on a possible way to do a check for unique items based on a date. I would use this result to hide conditionally, a button.

---

<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:** [April 1, 2021, 11:19pm UTC](https://community.glideapps.com/t/conditional-date-count-match/25018/2 "2021-04-01T23:19:41Z")

</div>

So your data structure now contains a date column, an item name column and a quantity column.

The easier way is to use a query formula inside Sheets.

Inside Glide, I would make a relation from the date column to itself, then count the unique number of item names/IDs. Would that work?

---

<div class="post-metadata">

**Author:** ![Daniel\_Canup](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daniel_canup/32/32850_2.png) [@Daniel\_Canup](https://community.glideapps.com/u/Daniel_Canup)\
**Post date:** [April 8, 2021, 10:04pm UTC](https://community.glideapps.com/t/conditional-date-count-match/25018/3 "2021-04-08T22:04:49Z")

</div>

https://player.vimeo.com/video/534639148

---

<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:** [April 8, 2021, 11:47pm UTC](https://community.glideapps.com/t/conditional-date-count-match/25018/4 "2021-04-08T23:47:43Z")

</div>

One solution on top of my mind is this. I assume you’re having a user profiles sheet.

Create a template column joining the user’s email and the current day (you can generate this via a math column pointing to “now” and select date only).

In the sheet where you store the submisssions, create the same type of template, make sure the date formats match.

Create a relation between the two columns in the profiles sheet, then a joined list column to return all submitted types for that day.

The choice component in the form would be filtered by “choice option name is not included in user’s joined list of submitted items for that day”.

For hiding the button, assuming you will only ever have max 2 submissions each day, do a rollup on top of the relation in the user profiles sheet. Show the form as long as rollup is less than 2.

---

<div class="post-metadata">

**Author:** ![Daniel\_Canup](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daniel_canup/32/32850_2.png) [@Daniel\_Canup](https://community.glideapps.com/u/Daniel_Canup)\
**Post date:** [April 9, 2021, 5:58pm UTC](https://community.glideapps.com/t/conditional-date-count-match/25018/5 "2021-04-09T17:58:49Z")

</div>

Is the “joined list column to return all submitted types for that day.” Supposed to be on the Users Table?  
If so I think it should only be returning one as I only have one goal set for the current day so far.

 ![Screen Shot 2021-04-09 at 1.03.34 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/b/5b678017a9dd3001e2a4a7c30cb814b9c74b7329.png)

 ![Screen Shot 2021-04-09 at 1.04.56 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/7/572a71eb383fea9139bcb7ae44c2dbde97dc165e.png)

---

<div class="post-metadata">

**Author:** ![Daniel\_Canup](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daniel_canup/32/32850_2.png) [@Daniel\_Canup](https://community.glideapps.com/u/Daniel_Canup)\
**Post date:** [April 9, 2021, 7:40pm UTC](https://community.glideapps.com/t/conditional-date-count-match/25018/6 "2021-04-09T19:40:06Z")

</div>

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/0/706bfb4713b808f23916bf257047974856ddfd09.png) ](https://dl.dropboxusercontent.com/s/mn60r6nhvga4v2n/Screen%20Shot%202021-04-09%20at%201.39.55%20PM.png?dl=0)

---

<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:** [April 9, 2021, 11:02pm UTC](https://community.glideapps.com/t/conditional-date-count-match/25018/7 "2021-04-09T23:02:50Z")

</div>

So is it good to go now? Let me know if I can help more.

---

<div class="post-metadata">

**Author:** ![Daniel\_Canup](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daniel_canup/32/32850_2.png) [@Daniel\_Canup](https://community.glideapps.com/u/Daniel_Canup)\
**Post date:** [April 12, 2021, 2:10pm UTC](https://community.glideapps.com/t/conditional-date-count-match/25018/8 "2021-04-12T14:10:38Z")

</div>

THANK-YOU so much for the help.

---

<div class="post-metadata">

**Author:** ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)\
**Post date:** [January 17, 2024, 4:52pm UTC](https://community.glideapps.com/t/conditional-date-count-match/25018/9 "2024-01-17T16:52:39Z")

</div>


