In theory this is simple, but in practice, is not so obvious without knowing the platform.
I spent few hours researching this without success.
I have a form linked to a Google Spreadsheet table. Users can enter a new report for the given day/shift.
Table and values
REPORT_ID = UNIQUEID()
DATE = TODAY()
SHIFT = ENUM (there are only 2 shifts AM, PM)
Our team can create a daily report only if it doesn’t exist. If the report already exist for the given DATE and SHIFT.
When the user creates a new report pressing the ADD button, I’d like the app to query the table, and:
if the report was already created for the selected DAY and SHIFT, then display a message: Report already created
if the report doesn’t exist, then message: New report created.
How do I prevent users from creating duplicated reports? Every shift can only have 1 report.
Thanks ahead for the help
(I could create a combined column key DATE & SHIFT, but my intent is to validate that no other reports have the same DATE & SHIFT. In the future, we might allow the creation of multiple reports per shift)