# Avoid duplicate month entries for monthly reporting

**URL:** <https://community.glideapps.com/t/avoid-duplicate-month-entries-for-monthly-reporting/75287>\
**Category:** Ask for Help\
**Created:** [July 30, 2024, 2:58pm UTC](https://community.glideapps.com/t/avoid-duplicate-month-entries-for-monthly-reporting/75287 "2024-07-30T14:58:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Viner](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/matt_viner/32/36114_2.png) [@Matt\_Viner](https://community.glideapps.com/u/Matt_Viner)\
**Post date:** [July 30, 2024, 2:58pm UTC](https://community.glideapps.com/t/avoid-duplicate-month-entries-for-monthly-reporting/75287/1 "2024-07-30T14:58:13Z")

</div>

I’m having companies report their revenues via a form in an app. If I use a date-picker I get nice data (and can pull the month / year), but I don’t know how to prevent them adding data twice in the same month.

If I prefil the months/rows (i.e. with their projected revenue) and then use choices with the months with blank revenue I can ensure no duplicates, but I lose the data format.

If I prefil and show a table then they can just edit blank cells, but they might edit the wrong cells or change past cells.

I don’t want to use an update each entry they make (so no text to date, not that I understand it well anyway).

Is there another option?

---

<div class="post-metadata">

**Author:** ![Matt\_Viner](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/matt_viner/32/36114_2.png) [@Matt\_Viner](https://community.glideapps.com/u/Matt_Viner)\
**Post date:** [July 30, 2024, 3:45pm UTC](https://community.glideapps.com/t/avoid-duplicate-month-entries-for-monthly-reporting/75287/2 "2024-07-30T15:45:46Z")

</div>

Solved this with a fun approach: I’ll first make projections (means I can use the date picker as I’m relying on staff not external users); this creates a collection and I show the months with a slide in edit form; once they report, the collection filters that month away.

---

<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 30, 2024, 11:52pm UTC](https://community.glideapps.com/t/avoid-duplicate-month-entries-for-monthly-reporting/75287/3 "2024-07-30T23:52:53Z")

</div>

You can consider this approach:

- Have a button to open that form, which I assume you have already.
- Record the company’s email/ID in the submissions table, and the timestamp that they report their revenues. I assume they always report at the end of the month, the approach would change a bit if they always log July’s revenues in August, for example.
- Have a Math column in the destination table: YEAR(D)\*10^2+MONTH(D) with D being the submission date.
- Have a Math column in your users table: YEAR(N)\*10^2+MONTH(N) with N being the “Now” value.
- Have a query column in your users table, target the submissions table, filter by email/ID is this row’s email/ID, and the submission date’s Math value being equal to this row’s “now” Math value.
- If the query is not empty, hide the form, and vice versa.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [August 6, 2024, 11:53pm UTC](https://community.glideapps.com/t/avoid-duplicate-month-entries-for-monthly-reporting/75287/4 "2024-08-06T23:53:11Z")

</div>

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