开发者

Sharepoint calculated column produces NaN after variable declared as number in Javascript

开发者 https://www.devze.com 2023-04-02 20:57 出处:网络
I currently sum up 8 columns in my sharepoint list in order to get the total value i set this value in t开发者_如何转开发he calculated column as number.

I currently sum up 8 columns in my sharepoint list in order to get the total value i set this value in t开发者_如何转开发he calculated column as number.

Within my Jquery script i declare the variable as a number and then assign the SP list row ID to display the number value, however this dispalys NAN in my table... Can anyone help...

Variable:

      Volume_Total[i] = Number($(this).attr("ows_Volume_Total"));

Calculated Column Image:

Sharepoint calculated column produces NaN after variable declared as number in Javascript


$(this).attr("ows_Volume_Total") is a string. I'm not used to sharepoint, but shouldn't that be an int or something else?

Have you tried to put something like parseInt($(this).attr("ows_Volume_Total")) or parseInt($(this).attr("ows_Volume_Total")) depending of your need.

0

精彩评论

暂无评论...
验证码 换一张
取 消