Page 1 of 1

Field type error

Posted: 08 Sep 2015
by Victoria Morris
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?

Re: Field type error

Posted: 08 Sep 2015
by rostislav
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.

Re: Field type error

Posted: 08 Sep 2015
by Victoria Morris
Thanks so Much that fixed it for me!

Cheers!

-Victoria