Page 1 of 1

Number Column Issue

Posted: 21 Dec 2017
by ksertkaya
Hi,

I have problem about number column. I calculated this value in SP Form Designer. When I save this item, Sharepoint shows this value without point. How can I resolve this issue?
Screenshot_40.png
Screenshot_40.png (9.34 KiB) Viewed 2007 times
Screenshot_43.png
Screenshot_43.png (4.94 KiB) Viewed 2007 times

Re: Number Column Issue

Posted: 21 Dec 2017
by Nikita Kurguzov
Hello, ksertkaya!
What culture are you using for the site? This might play a role, perhaps you need to relace . with , It depends on the culture.
If this doesn't help, can you show us your script?

Re: Number Column Issue

Posted: 26 Dec 2017
by ksertkaya
My code is just fd.field('a').value() * fd.field('b').value()

Spform use point. But number column delete it.
Screenshot_67.png
Screenshot_67.png (23.07 KiB) Viewed 1995 times

Re: Number Column Issue

Posted: 26 Dec 2017
by Nikita Kurguzov
Dear ksertkaya,
Please, check locale settings for your site. We get similar result in our tests if the culture selected has different decimal symbol. You can even try it yourself, if you replace dot with coma, it's likely to save the value correctly.

While your browser settings are definitely correct as we can see on the attached screenshots, it's SharePoint site settings which are more important here.

You can check it yourself if you go to Site Settings:
SiteSettings.png
SiteSettings.png (8.41 KiB) Viewed 1993 times
Then go to Regional Settings:
SiteSettingsRegionalSettings.png
SiteSettingsRegionalSettings.png (26.71 KiB) Viewed 1993 times
And here you can see the locale that determines number formatting for the site:
SiteSettingsRegionalSettingsLocale.png
SiteSettingsRegionalSettingsLocale.png (14.39 KiB) Viewed 1993 times
If the locale is set to United States or another culture that also has dot as decimal symbol, then the result is very strange. I recommend you to check a default form to see if it has a dot or a coma as a decimal symbol.

More importantly, I am not sure why the code fails and puts the wrong symbol, but we can solve this issue if we figure out the reason behind saving the incorrect value. If it's culture, you'll either be able to change culture or if it is undesirable, we can write some custom JS for you to replace dot with coma after multiplication.

Re: Number Column Issue

Posted: 05 Jan 2018
by ksertkaya
Resolved. Thanks a lot! :)

Re: Number Column Issue

Posted: 05 Jan 2018
by Nikita Kurguzov
Excellent! You are very welcome! :D