comma (,) not working as a decimal separator

rad2
Mega Sage

The issue is I have a record producer(RP) on a custom table. In this RP is a STRING field to store COST. 

I enter 12,3 in the COST field.

I expect it to be stored as 12,3 . When i query the newly created record on my custom table i see 123.

',' comma in my locale is a decimal separator.

 

1. There are no client scripts running on the table

2. the decimal separator when checked in background script is ',' comma

3. the issue is seen on record producer

4. browser location is also set according

7 REPLIES 7

As indicated in my first post I would expect string 12,3 to be entered and shown as 12,3
Have you confirmed that there are no client scripts running against the field?
Have you confirmed that the issue is not browser\local related?

The issue is I have a record producer(RP) on a custom table. In this RP is a STRING field to store COST. 

I enter 12,3 in the COST field.

I expect it to be stored as 12,3 . When i query the newly created record on my custom table i see 123.

',' comma in my locale is a decimal separator.

 

1. There are no client scripts running on the table

2. the decimal separator when checked in background script is ',' comma

3. the issue is seen on record producer

4. browser location is also set according

psphanindrakuma
Tera Guru
Tera Guru

Hi @rad2 

 

There is no method to convert comma separated string to float. But you can try these

originalNum = '1022,55';
cleanNum = originalNum.replace(",", ".");
float = parseFloat(cleanNum);

Please mark my answer correct/mark helpful.

Thanks,

Phanindra