Skip to main content
January 9, 2025
Question

Can't map a Decimal Source Field to a Number (Decimal) Record Field Type

  • January 9, 2025
  • 3 replies
  • 0 views

Hi everyone. I added a new Decimal field to one of my DB tables, but when I try to map this source field to the corresponding record field in Appian the Number (Decimal) type is not available in the dropdown (please see the screenshot below). Does anyone know what could be the reason for that? Even Appian recognizes the source field as Decimal, but still doesn't give me a proper option in the choice list. I would appreciate any advice on this matter. Thank you.

3 replies

nilanshum856600
January 17, 2025

You need to use the "double" datatype instead of decimal, only then will the record identify it as a Number (Decimal) field type.



Alter query for your reference:
 

ALTER TABLE `TEST_TABLE` CHANGE `test` `test` DOUBLE(50,0) NULL DEFAULT NULL;

January 20, 2025

Hi [mention:4aa566ad0f84424a82218927d1efa84a:e9ed411860ed4f2ba0265705b8793d05], thank you for your reply, but I actually found a way to assign a DECIMAL column in the DB to a DECIMAL record field in Appian. By specifying the proper scale, DECIMAL(50,3)  instead of DECIMAL(50,0), I was able to properly assign values between Appian and the database without issues.


Add Column reference:

ADD COLUMN `test` DECIMAL(50,3) NULL DEFAULT NULL

karumurua531442
January 18, 2025

hi [mention:427285125d0b43f38663eeeeb578173e:e9ed411860ed4f2ba0265705b8793d05]  You can try changing it from decimal to float/ double data type
difference between float and double is

Float

  • A float is a single-precision floating-point data type.
  • It has a precision of approximately 7 decimal digits.
  • This means that numbers stored as float may lose some precision after 7 digits.

Double

  • A double is a double-precision floating-point data type.
  • It has a precision of approximately 15-16 decimal digits.
  • double can represent numbers with much greater precision than float