Hi everyone,
I’m creating a survey in Survey123 Connect, and I need help enforcing a quarterly data-collection rule.
In my form, I have a field called Reference_FarmID. I will be using one device to collect all data. What I want to achieve is:
When a Reference_FarmID has already been submitted within a given quarter (Q1, Q2, Q3, or Q4),
Any second attempt to submit the same Reference_FarmID within that same quarter should be rejected.
In short, each Reference_FarmID should only be allowed one submission per quarter.
Has anyone implemented something similar? What’s the best approach to prevent duplicate submissions based on time periods?
I think this thread will help you: https://community.esri.com/t5/arcgis-survey123-questions/create-a-constraint-based-on-values-in-anot...
The short is have a question that captures the ID and another that captures the the Quarter. In a calculate question concat those two something like : concat(${ID},"_",${Quarter}). (You could do each separately and then set your constraint on both ID and Quarter questions, but then you have two pulldatas to deal with).
then use pulldata(@layer) to check if that id and quarter exist already in your responses.
The only caveat is that you have to be online.