Long variable type not really supported

Hi, I’m trying to use the type=xsd:long variable in an xform. It doesn’t
throw an error when I use the long variable type, but when I get to the
form element in the application, it behaves just like a string element.
Meaning, it stores characters other than digits and does not default to
numeric entry. Is there another variable type to use that supports more
digits than the integer?

Jon

on the phone, i don’t think so. i think the best you can do is a string
type, with a validation constraint that throws an error if you haven’t
entered all numbers.

touchforms supports a ‘numeric string’ field, though.

··· On Tue, Jan 18, 2011 at 1:04 AM, Jonathan Payne wrote:

Hi, I’m trying to use the type=xsd:long variable in an xform. It doesn’t
throw an error when I use the long variable type, but when I get to the form
element in the application, it behaves just like a string element. Meaning,
it stores characters other than digits and does not default to numeric
entry. Is there another variable type to use that supports more digits than
the integer?

Jon

Yeah, Drew’s correct that this is all we currently support. I’ll see if we
can roll in cleanly the ability to use one of the higher level datatypes
which accept numeric digits but don’t represent a bounded numeric datum.

-Clayton

··· On Tue, Jan 18, 2011 at 8:10 AM, Drew Roos wrote:

on the phone, i don’t think so. i think the best you can do is a string
type, with a validation constraint that throws an error if you haven’t
entered all numbers.

touchforms supports a ‘numeric string’ field, though.

On Tue, Jan 18, 2011 at 1:04 AM, Jonathan Payne paynejd@gmail.com wrote:

Hi, I’m trying to use the type=xsd:long variable in an xform. It doesn’t
throw an error when I use the long variable type, but when I get to the form
element in the application, it behaves just like a string element. Meaning,
it stores characters other than digits and does not default to numeric
entry. Is there another variable type to use that supports more digits than
the integer?

Jon

I had the same problem and ended up using ‘double’ which worked well. Gayo

··· -----Original Message----- From: commcare-users@googlegroups.com [mailto:commcare-users@googlegroups.com] On Behalf Of Jonathan Payne Sent: Tuesday, January 18, 2011 12:04 AM To: commcare-users@googlegroups.com Subject: long variable type not really supported

Hi, I’m trying to use the type=xsd:long variable in an xform. It doesn’t
throw an error when I use the long variable type, but when I get to the
form element in the application, it behaves just like a string element.
Meaning, it stores characters other than digits and does not default to
numeric entry. Is there another variable type to use that supports more
digits than the integer?

Jon

Thanks. In the meantime, I can use the float or double variable type
but will need help getting the variable to display in a standard format
rather than in scientific format after entry. This is a 10-digit phone
number. How would I do this?

Jon

··· On 1/18/2011 9:46 PM, Clayton Sims wrote: > Yeah, Drew's correct that this is all we currently support. I'll see > if we can roll in cleanly the ability to use one of the higher level > datatypes which accept numeric digits but don't represent a bounded > numeric datum. > > -Clayton > > On Tue, Jan 18, 2011 at 8:10 AM, Drew Roos <droos@dimagi.com > wrote: > > on the phone, i don't think so. i think the best you can do is a > string type, with a validation constraint that throws an error if > you haven't entered all numbers. > > touchforms supports a 'numeric string' field, though. > > > On Tue, Jan 18, 2011 at 1:04 AM, Jonathan Payne <paynejd@gmail.com > wrote: > > Hi, I'm trying to use the type=xsd:long variable in an xform. > It doesn't throw an error when I use the long variable type, > but when I get to the form element in the application, it > behaves just like a string element. Meaning, it stores > characters other than digits and does not default to numeric > entry. Is there another variable type to use that supports > more digits than the integer? > > Jon > > >