Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: SPService Fetch data problem

$
0
0

I'd love to see some metrics. Since you have Firebug, can you run this slightly modified code?

  var startTime = +new Date();
  
  var querySkill = "<Query><Where><And><Eq><FieldRef Name='User_x003a_ID' /><Value Type='Lookup'>"+rowUserId+"</Value></Eq><And><Eq><FieldRef Name='Role_x003a_ID' /><Value Type='Lookup'>"+rowRoleId+"</Value></Eq><And><Eq><FieldRef Name='Skill_x0020_Category_x003a_ID' /><Value Type='Lookup'>"+rowCategoryId+"</Value></Eq><Eq><FieldRef Name='Skill_x0020_Group_x003a_ID' /><Value Type='Lookup'>"+rowGroupId+"</Value></Eq></And></And></And></Where></Query>"
        var camlViewFieldsSkill = "<ViewFields><FieldRef Name='Fulfillment' /></ViewFields>";
        var groupPer;
        var groupArray = new Array();
        $().SPServices({
            operation: "GetListItems",
            async: false,
            listName: "User Skills",
            CAMLQuery: querySkill,
            CAMLViewFields: camlViewFieldsSkill,
            completefunc: function (xData, Status) {
                console.log( "Milliseconds it takes to get the XML back from the server: " + +new Date() - startTime );
                
                $(xData.responseXML).find("z\\:row, row").each(function () {
                  var skillId = $(this).attr("ows_ID");
                  var skillName=$(this).attr("ows_Skill").split("#")[1];
                  var fulfilment=$(this).attr("ows_Fulfillment");
                    $(subGridSkill).jqGrid('addRowData', skillId, { id: skillId, skillid: skillId, skill:skillName, skillfulfillment: fulfilment });

                });
                
                console.log( "Milliseconds it takes to process and display the XML: " + +new Date() - startTime );
            }
        });

Just post both of the messages that are displayed in the console.

Cheers,
Matthew


Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>