Number Column Issue

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
ksertkaya
Posts: 87
Joined: Wed Nov 18, 2015

21 Dec 2017

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 2004 times
Screenshot_43.png
Screenshot_43.png (4.94 KiB) Viewed 2004 times

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

21 Dec 2017

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?
Cheers

ksertkaya
Posts: 87
Joined: Wed Nov 18, 2015

26 Dec 2017

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 1992 times

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

26 Dec 2017

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 1990 times
Then go to Regional Settings:
SiteSettingsRegionalSettings.png
SiteSettingsRegionalSettings.png (26.71 KiB) Viewed 1990 times
And here you can see the locale that determines number formatting for the site:
SiteSettingsRegionalSettingsLocale.png
SiteSettingsRegionalSettingsLocale.png (14.39 KiB) Viewed 1990 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.
Cheers

ksertkaya
Posts: 87
Joined: Wed Nov 18, 2015

05 Jan 2018

Resolved. Thanks a lot! :)

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

05 Jan 2018

Excellent! You are very welcome! :D
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests