Select to view content in your preferred language

Survey123: Capitalize user's input/Replace whitespaces

3126
3
12-08-2017 06:12 AM
AaronThompson
Occasional Contributor

Hello all,

I'm using Survey123 Connect with ArcGIS Enterprise 10.5 feature services

I am wondering if there is a way in a Survey123 XLSform to take a user's input to a text field (example: serial number -> g964-b764) and perform a calculation to change all lowercase letters in the string to uppercase. Also, I would like to replace any whitespace in a text string with either no whitespace, or a hyphen. Is this possible? 

In python, these are equivalent to str.upper() and str.replace()

Thanks! 

0 Kudos
3 Replies
CarmelConnolly
Esri Regular Contributor

Hi Aaron, 

This should work by using a mask: Esri custom columns—Survey123 for ArcGIS | ArcGIS 

Entering something like >XXXXXXXXX will allow a 9 character string with all letters capitalised

If serial numbers vary in length you may need to make changes to allow for this. 

If the serial numbers are consistant, you could use something like this for the mask:

>XXXX-XXXX

Hope that helps!

Carmel

0 Kudos
AaronThompson
Occasional Contributor

Carmel, 

Thanks for the response. If my understanding of the input masks is correct, I can't make it an unknown length and apply it to all characters, or allow for either text or number in any given index of the string.. So it doesn't seem to me like this fits the bill for my situation?

0 Kudos
CarmelConnolly
Esri Regular Contributor

If the length of the entry is going to be variable, mask may not work unless you just make the X string very long. 

0 Kudos