Convert string to upper or lowercase

2730
9
05-22-2019 06:10 AM
deleted-user-En3Sgx626CLb
New Contributor

Is there a way to convert a string to all upper or lowercase or are there any plans to add this feature in the future? Not seeing any functionality listed in formulas. For validation we need to match two strings, the email of the user signed into S123 against a list of emails stored in the choices tab. The emails stored in Portal do not have consistent casing and the emails we are checking in the choices are coming from a different system. Would be nice to have a feature like: lower(property('email')) = lower(${INSPECTOR}) on the constraint. ${Inspector} is coming from a dropdown of email choices, the user does not type in their email.

0 Kudos
9 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Brian,

There are not built-in functions within the XLSForm spec to generate all uppercase or lowercase text from a response.  This could be done in the field app via a custom javascript function, which is a beta feature - see more at the Early Adopter Community.

0 Kudos
deleted-user-En3Sgx626CLb
New Contributor

Nice, this is exactly the feature needed and also opens the doors for a lot of the possibilities. Unfortunately, looks like there is a bug tied to it that may be impacting deployment - seeing the Extensions disabled message for non-admin users of the survey in same organization. Appears users have reported it and plans is to fix in 3.5. Need to take a closer look at and see if that resolves the issue, thanks!

0 Kudos
DeonLengton
Esri Contributor

Hi James

When will this move out of Early Adopter?

JamesTedrick
Esri Esteemed Contributor

Hi Deon,

Currently the only issue preventing release involves the authoring process- currently, Survey123 Connect must be restarted if you make a change to the JS file.  We are hoping to resolve that for the next release.

0 Kudos
CindyJayakumar
New Contributor

This is excellent news. We've been trying out this functionality extensively within the team, so I'm really excited to roll it out on a project as soon as it moves into production.

0 Kudos
ahargreaves_FW
Occasional Contributor III

@JamesTedrick any update on your answer from over 3 yrs ago? The ability to easily switch cases and/or to compare strings regardless of case, is a common need.

0 Kudos
SamuelSchneider
New Contributor III

Is this method of changing the JavaScript file still the recommended method? Am I able to use the UPPER() Excel function in any capacity?

 

Thanks!

0 Kudos
chelynnes
New Contributor III

Has this been resolved yet? I feel like it should be easier. You can do it to normal excel docs. 

Scott_Sambell
Occasional Contributor

Is there any progress on this? I need to compare two GUIDs in a form and for some reason one is coming in as lowercase and the other uppercase.  All i need to do is change one or the other and compare them to trigger conditional visibility on a note.  Very simple stuff but i can't do it without changing the case on one of them.

Scott