cancel
Showing results for 
Search instead for 
Did you mean: 

Create a decimal field

delphine_
Star Contributor
Star Contributor

Hello,

I want to create a decimal field for a document. I try "integer" but I can just write an integer ... Then, I try "floating point" but even if I write "35.68", it save "35.0".

How can I do it ?

Thanks in advance for your help

1 ACCEPTED ANSWER

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

I just tested, and had no issue. I guess since you started with an "int" type, the database was initialized to store an integer for this field. When changing it to a "floating point" after, i see the following error in logs:

ERROR [org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper] SQL type mismatch for "FILE_SCHEMA"."MYINTOTBEFLOAT": expected 8, database has -5 / BIGINT (19)

So i guess you just need to drop your test database for this to be working as expected (or to alter the database column if you'd like to keep your current data)

View answer in original post

4 REPLIES 4

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

When you say "it saves", what do you mean? How are you setting this value? What widget type are you using if you're setting this via a form?

delphine_
Star Contributor
Star Contributor

In Studio, I creates a document type "XXX" with a field "Floating Point" (my_field).

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

I just tested, and had no issue. I guess since you started with an "int" type, the database was initialized to store an integer for this field. When changing it to a "floating point" after, i see the following error in logs:

ERROR [org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper] SQL type mismatch for "FILE_SCHEMA"."MYINTOTBEFLOAT": expected 8, database has -5 / BIGINT (19)

So i guess you just need to drop your test database for this to be working as expected (or to alter the database column if you'd like to keep your current data)

Thank you very much ! I altered the column and it works !

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.