Soliciting for ideas with the goal of a constraint checking a string with input mask of 9999-99999999 starts with YYYY-00 or YYYY-002.
I have a complex workflow where 911 calls are ingested using ArcGIS Velocity, but Survey123 is also used in edit mode in a dashboard to add additional details to that call for related programs.
The users (responders) utilizing the form normally see the incident numbers formatted like: 2025-0200201 from their records management system, but the 911 system uses 2025-00200201. Now when ArcGIS Velocity hits the database, the API query doesn't catch every incident until the right 911 call notes appear and so responders can also use survey123 to log "missing incidents" which submits to the same database that ArcGIS Velocity does - sometimes there's just a lapse in time - so like someone logs 2025-00200201 as missing and then when the API catches up, it overwrites the API related attributes and leaves the Survey123 attributes as logged - all caught up. Great.
SOMETIMES responders log the missing incident number incorrectly and so I'm trying to come up with more rules to control their errors. Most of the time it's like 2025-00020201 or 2025-02000021 so I'd like to have a constraint that somehow checks they at least got it starting like 2025-002
It is unlikely in my community we will get past 2025-00299999 and then it starts over in 2026 etc.
I've already got the typical input mask for 9999-99999999, and I check for existing incidents in the database using pull data so they can't submit a duplicate at least.... but I'm still getting bad entries haha
So just soliciting for other potential ideas with the goal of the constraint is checking that it starts with YYYY-00 or YYYY-002.
And if you're at the Dev Summit next week, come to my presentation on this project! March 12 2025 3:15 PDT Mesquite B 🙂
I am guessing it is a string so maybe substr(question, start, end) could work?