Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

spservices, jquery

Posted on 2013-05-17
2
Medium Priority
?
423 Views
Last Modified: 2013-05-17
Can somebody please help with understand what this line means in the code below:
var var numRecords = parseInt($(xData.responseXML).SPFilterNode('rs:data').attr('ItemCount'), 10);


I know it's doing some type of count but what is the ",10" for? Thx!

 $().SPServices({
		operation: "GetListItems",
		async: false,
		listName: "Site_Projection",
		CAMLViewFields: "<ViewFields><FieldRef Name='"+sourceTypeLower+"P<wbr ></wbr><wbr ></wbr>rojectedDa<wbr ></wbr>te'></Fiel<wbr ></wbr>dRef></Vie<wbr ></wbr>wFields>",<wbr ></wbr>     
		CAMLQuery: "<Query><Where><And><Eq><F<wbr ></wbr><wbr ></wbr>ieldRef Name='ProgramName' /><Value Type='Lookup'>"+ programName + "</Value></Eq><And><Geq><F<wbr ></wbr><wbr ></wbr>ieldRef Name='"+TypeLower+"P<wbr ></wbr><wbr ></wbr>rojectedDa<wbr ></wbr>te' /><Value Type='DateTime'>" + beginFY + "</Value></Geq><Leq><Field<wbr ></wbr><wbr ></wbr>Ref Name='"+TypeLower+"P<wbr ></wbr><wbr ></wbr>rojectedDa<wbr ></wbr>te' /><Value Type='DateTime'>" + endFY + "</Value></Leq></And></And<wbr ></wbr><wbr ></wbr>></Where><<wbr ></wbr>/Query>",
		completefunc: function (xData, Status) {			
			var numRecords = parseInt($(xData.responseX<wbr ></wbr><wbr ></wbr>ML).SPFilt<wbr ></wbr>erNode('rs<wbr ></wbr>:data').at<wbr ></wbr>tr('ItemCo<wbr ></wbr>unt'), 10);

Open in new window

0
Comment
Question by:Isaac
2 Comments
 
LVL 23

Accepted Solution

by:
Ioannis Paraskevopoulos earned 1000 total points
ID: 39175434
Hi,

Check this: http://www.w3schools.com/jsref/jsref_parseint.asp

10 says that the string returned by $(xData.responseXML).SPFilterNode('rs:data').attr('ItemCount') is a decimal.

Giannis
0
 
LVL 44

Assisted Solution

by:Rainer Jeschor
Rainer Jeschor earned 1000 total points
ID: 39175438
Hi.
the 10 is the base number format == decimal.
parseint(11,2) would be 3
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question