Incorrect Constraint Message KoboCollect

Hi Folks,

I am testing a form I have deployed on an Android device (Kobo Collect) and on an iPhone (Enketo). I was deliberately testing what happens when I scan the wrong code, as I want enumerators to scan the correct code. With Enketo, I get the correct error message (You need to be scanning a Trap code), because the code should be in the format of Trap 111.

But with Kobo Collect I do not get the error message in the form, I get something about arguments:

My code is as follows:
EnketoScanError

The KoboCollect error message doesn’t help the enumerator identify the problem.

I have now generated correct QR codes to test the KoboCollect system with, and I still get the same error message, even though the QR code says Trap 1 (as ostensibly required by my form):

So this is a bigger problem than I thought - even with the correct code, the enumerator cannot move on to fill out the rest of the form.

Please help!

Thank you,
Tania

I have solved my problem! Woo hoo!! I had incorrectly coded the constraint.
The original coding was regex(., ‘^Trap’ , .)
It should instead be regex(., ‘^Trap.*’)

The asterisk now allows anything to come after “Trap”, so the trap number can be included.

2 Likes

@taniak, thank you for sharing the solution with the entire community, :tada: :heart: :bowing_man: