Field type error

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Victoria Morris
Posts: 2
Joined: Tue Sep 08, 2015

08 Sep 2015

Hi,

In my SHarePoint list the field type is number - when I open the feild type in the plumsail Form desinger is says it has a field type of text - so when I try and Java script do a numeric calucluation it appends the number - 3+ 3 = 33 instead of 6 - what am I doing wrong?

User avatar
rostislav
Moderator
Posts: 364
Joined: Mon Oct 19, 2015

08 Sep 2015

I guess you're trying to concatenate two strings, as fd.field().value() returns textual representation of a field. You can use parseFloat() function to parse your string, like this:

Code: Select all

parseFloat('30.3') + parseFloat('10');
this would return 40.3.

If you only need to add whole numbers you can use parseInt() the same way.

Victoria Morris
Posts: 2
Joined: Tue Sep 08, 2015

08 Sep 2015

Thanks so Much that fixed it for me!

Cheers!

-Victoria

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 20 guests