First, a little background. I have a workflow that involves going out and servicing a series of assets on a weekly basis. Each asset has a unique barcode/ID that the user scans or manually enters into Survey123, along with a series of other questions. Upon reviewing the data for reporting I noticed a hair pulling amount of errors, one of which was people entering data for a particular asset more than once. Apparently my techs don't like scanning barcodes and prefer to just enter things manually.
At that point I decided I would just design a better form that made it nearly impossible for my users to submit erroneous records.
Enter the duplicate checker. I admittedly do not have the skills to come up with something like this from scratch, so naturally I pilfered it from another Survey123 user after some GoogleFu. From my understanding, I'm basically using a join in the calculation field to populate a list of barcodes/IDs. Then, I have an expression in the constraint field to check and make sure each additional repeat (i.e. Barcode/ID) does not already exist in the join list.
Here is the constraint expression:
not(contains(substr(${Tubes_Serviced}, 0, string-length(${Tubes_Serviced}) - 3), ${Barcode}))
The issue I'm experiencing now is that if the user enters a duplicate and somehow navigates backwards in the repeat section before immediately deleting it, they get locked in place. The duplicate checker kicks in triggers off the currently displayed repeat, which prevents them from navigating forward, unless they delete the current record.
I'm wondering if there is a way to modify this expression to prevent this lockout that happens when navigating to/from duplicate repeat records?
Thanks for reading!
-Dusty
P.S. I've attached my xlsx form if it helps getting the whole picture.
P.S.S. I've also learned that it seems no matter what you do, errors will find a way.