ASCII conversion

Hello,

I was wondering if there was a function in CommCare that could convert a
character into its ASCII value. For instance, a function that would take
the letter ‘A’ and turn it into the integer 65, much like the CODE function
in Excel. Thanks.

-Jared

Jared,

Unfortunately CommCare doesn’t have a function to do this. The closest you
could get would probably be to use a lookup table
https://confluence.dimagi.com/display/commcarepublic/Creating+and+Updating+Lookup+Tables
to
map from the character to its ASCII representation.

-Will

··· On Mon, Feb 8, 2016 at 10:44 AM, wrote:

Hello,

I was wondering if there was a function in CommCare that could convert a
character into its ASCII value. For instance, a function that would take
the letter ‘A’ and turn it into the integer 65, much like the CODE function
in Excel. Thanks.

-Jared


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hey Jared,

I’m curious what you’re trying to do with this function? There might be
other ways to achieve what you want.

Thanks,
Sheel

··· On Feb 8, 2016 10:44 AM, wrote:

Hello,

I was wondering if there was a function in CommCare that could convert a
character into its ASCII value. For instance, a function that would take
the letter ‘A’ and turn it into the integer 65, much like the CODE function
in Excel. Thanks.

-Jared


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Sheel,

I have some users who would like to have check digits implemented for
certain codes that they enter in the tablet. They prefer using alphanumeric
codes, but the check digit calculations require numbers. I found another
way to convert letters to numbers using the replace and int functions, its
just a bit more tedious.

-Jared

··· On Tuesday, February 9, 2016 at 9:12:27 AM UTC-5, Sheel Shah wrote: > > Hey Jared, > > I'm curious what you're trying to do with this function? There might be > other ways to achieve what you want. > > Thanks, > Sheel > On Feb 8, 2016 10:44 AM, <jol...@nd.edu > wrote: > >> Hello, >> >> I was wondering if there was a function in CommCare that could convert a >> character into its ASCII value. For instance, a function that would take >> the letter 'A' and turn it into the integer 65, much like the CODE function >> in Excel. Thanks. >> >> -Jared >> >> -- >> You received this message because you are subscribed to the Google Groups >> "commcare-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-user...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> >