I have a KOBO form which is to collect Beneficiary Data Collection using their ID Card. ID Card has two barcodes. One is the beneficiary’s numeric ID Number which is we intend to collect (e.g. - “1777690765512”). Another is their track number which has text on it. (e.g- “PHY-1999222” ) which we do not need to collect. I want to add a constraint to the barcode field so that if anyone scan the track number it will show an error message. Please note that the numeric ID Number has a range of lengths, from 6 digits to 21 digits.
Is there any way to add constraint which only allows scanning numeric number and if the scanned barcode has text in it, it will show an error?
Welcome to the community @rifat_iom! Have you gone through our post discussed previously on how to pull data though a predefined barcode (it should help you):
Besides, here is also a post that deals with barcode constraints:
Given that you are sure that your ID will be a number, I would suggest creating a simple constraint such as .>=1
This will only allow for the barcode scanned to be a number. If you know the length of the numeric ID, as 6 and 12 in this case, you can also play with your constraint to be .>=99999 and .<=1000000000000