4

I have a list with a several columns that have number values to fourth decimal place, and I am using javascript com to get data via rest GET request and following simple callback

function onGetScoreCallback(response, eventArgs) {
  var thisData = JSON.parse(response.get_responseData());
  for ( var i = 0; i < thisData.d.results.length; i++ ) {
      $('.selector').text(thisData.d.results[i].Score);
  }
}

Simple. Only I've noticed the value is truncated to the tenth. So I just viewed the source at the ListData.svc/MyList and the xml is showing all the values truncated (not rounded) to the tenth for everything....

Is this normal limitation of this type of approach or am I just missing something. I have been unable to find info on this anywhere.

3
  • JSOM COM get list items working though...switched to that however I am still curious about this....?
    – Justin
    Jul 13, 2013 at 19:28
  • No idea why but this magically resolved itself. I didn't change anything and all of a sudden all decimal places (3 for each) started coming back again. even in xml. ???
    – Justin
    Jul 28, 2013 at 11:42
  • was this happening on-prem or on O365?
    – 1c1cle
    Sep 4, 2013 at 14:37

1 Answer 1

1

The value of a return type is formatted as per the WSS default for all fields or that content type.

"Decimal Places Mirrors the Number of decimal places setting in Windows SharePoint Services."

http://office.microsoft.com/en-gb/access-help/import-from-or-link-to-a-sharepoint-list-HA001230313.aspx

The only possible answer is that someone altered this unknowingly and it either got altered back by a reactivation of a feature which includes that content type, or it being set back.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.