I have a barcode question on my survey that is a required field, and I have a regular expression that constrains it to a certain length. However, I have gotten a lot of complaints from the field that when they scan the barcode (actually a QR code) it adds a space to the end of the value it retrieved from the barcode. They have to manually delete the extra space before they can successfully submit their record. I am try to minimize data entry time as much as possible. James Tedrick do you know of a solution for this?
Solved! Go to Solution.
You could try a calculation like this:
if(ends-with(${qrcode}," "),substr(${qrcode},0,string-length(${qrcode})-1),${qrcode})
Your QRCode question could be flagged to have an esriFieldType of null.
Then you would add a hidden question and add the calculation above.
If you do not want to change the geodatabase schema, then you can do the following:
Convert your barcode question into a hidden question and add the calculation above to it.
Add a new barcode question, set the label and all as you like and MAKE sure you have it as esriFieldType null
If it helps, this is my regular expression: regex(., '^
Survey123 Geonet got anything for me? Any help is greatly appreciated!
You could try a calculation like this:
if(ends-with(${qrcode}," "),substr(${qrcode},0,string-length(${qrcode})-1),${qrcode})
Your QRCode question could be flagged to have an esriFieldType of null.
Then you would add a hidden question and add the calculation above.
If you do not want to change the geodatabase schema, then you can do the following:
Convert your barcode question into a hidden question and add the calculation above to it.
Add a new barcode question, set the label and all as you like and MAKE sure you have it as esriFieldType null
genius! Thanks a ton!