XML Schema error on manual entry of dataset with NUMERIC datatype

LabKey Support Forum
XML Schema error on manual entry of dataset with NUMERIC datatype Georgia Mayfield  2019-06-24 15:10
Status: Closed
 

Hello,

I got an XMLSchema error on implementing a dataset in LabKey running on Postgres 9.5 regarding the NUMERIC datatype. The dataset was implemented with a required column of type NUMERIC, without a precision or scale specified. This is a valid datatype is Postgresql, and according to the LabKey SQL documentation is a LabKey defined valid datatype.

Our users have specifically requested the numeric datatype as it allows both integer and decimal values without padding zeroes after the decimal point, unlike the INTEGER or DOUBLE datatypes, the concern being that padded zeroes may appear to add degrees of certainty to an assay result which may or may not be true.

The dataset is able to instantiate with the datatype fine, and bulk upload with both integer and decimal values completes successfully and can be repeated.

However, on single entry I get a error related to the type. I am able to load one record without error, and the second time I click on the INSERT button the attached error takes place. This happens regardless of whether or not I insert an integer or decimal In the NUMERIC column during single entry. Seems like single entry is treating the NUMERIC datatype like the INTEGER datatype, and bulk upload is handling it appropriately.

Thanks!

Best, GM

 
 
Jon (LabKey DevOps) responded:  2019-07-11 21:17
Hi Georgia,

We're going to need some more details here.

What version of LabKey is this problem happening on? Was this dataset created within the UI or was it created through another means, like via a module?

The problem you're describing is not something I'm able to reproduce locally in a dataset with a Number (Double) for the field type when it comes to individual entries.

Looking at the error, that datatype appears to be incorrect. If the field is supposed to be using a decimal point, the XML schema should not be called "decimal", but "double" instead, so something like:

        <ns:RangeURI>http://www.w3.org/2001/XMLSchema#double</ns:RangeURI>

Regards,

Jon