How to add constrains on barscan for Survey123

345
2
01-30-2020 08:53 AM
AlanSS
by
New Contributor

Hi there,

I come across such a question: I have an order list with an instrument types list and their numbers for each type,  I try to add a constrains when doing the scan, I want limit the operator to scan times, for example instrument A scan 3 times, instrument B scan 1 time, see the attached detail data image sample. I can get these data from order list and scan result, my question is how I build a checking logic and/or put a constrain to the scan tool? Because my equipment list is a long list with 2 hundred types, so I want use the same scan tool, not 200 scan elements.  Thank you very much for any suggestions.

Alan

0 Kudos
2 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Alan,

I'm not quite sure I understand the workflow.  Each barcode question stores 1 value - if you need to scan multiple times, you would need to have either multiple barcode questions or a barcode question inside a repeat.

0 Kudos
AlanSS
by
New Contributor

Thanks James,

I resolve the issue. My solution is put a js constrain to verify each of scan; So I can make this barcode scan result is exactly same with booked items, for example I booked type1 quantity 3; type2 quantity 2000, type3 quantity 1; if I scan type1 4 times, error message will display to let user delete one and return one type1...in the end only type and quantity all same, then allow use can submit the form, otherwise error message will display. Lots of stuff in Survey123, really good product. Thanks.

Alan

0 Kudos