Exact same GetListItem code works when in one library documents set welcome page but not another library set document page on the same site

Feb 24, 2014 at 8:44 PM
Edited Feb 24, 2014 at 8:45 PM
Exact same GetListItem code works when in one library documents set welcome page but not another library set document page on the same site.  I am trying to use SPServicews to view data in a document page welcome page that is pulled from another libraries metadata on the same site.  This works fine.  But if I use the CEWP to pull this same data from the library it is coming fun and put the CEWP on a welcome page of one of the document sets on this library the data does not render.   So in brief the same code will not pull data when loaded within a welcome page from that library but it will pull the data when on a CEWP in another libraries Document Set We;lcome Page.  There is no other custom code on the library it is not pulling from i.e. only a single use of the SPServices the code of which is as follows.  Seems I've created some sort of "Gotcha" for myself and any help would be appreciated.  thanks -dave

<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
<script src="https://XXXX/JQUERY/jquery-1.8.3.min.js"></script>
<script src="/XXXX/jquery.SPServices-0.7.2.min.js" type="text/javascript"></script>
            background: rgb(248, 248, 248);
            padding: 2px;
            height: 30px;
            width: 150px;
            align: left;
            font-weight: bold;
            background: rgb(240, 240, 240);


  $(document).ready(function () 

var pnx=$("b:contains('Project Number')").parent().next().next().text(); //MUST BE INSIDE LOOP TO USE WITH INDEX OF!!!

                operation: "GetListItems",
                async: false,
                CAMLRowLimit: 2000,                
                listName: "Personnel Management",
                completefunc: fnCallBack

            });  //SPSERVICES
     }); //READY

        function fnCallBack(xData, Status) {
            var index = 0;
            $documentListtable = $("#documentListtable");
            //Navigate through the XML
            $(xData.responseXML).find("z\\:row, row").each(function () {

 var _ProjectNumbers1 = $(this).attr("ows_Project_x0020_Numbers");

                //Get the values to a local variable
                var _url = $(this).attr("ows_FileRef").split(";#")[1];
                var _name = $(this).attr("ows_LinkFilename");
                var _pdfLink = $("<a  href='/" + _url + "'>" + _name + "</a>");
                var _author = $(this).attr("ows_Editor").split(";#")[1];
        var _SalarySource = $(this).attr("ows_Salary_x0020_Source");
        var _TrainingStatus = $(this).attr("ows_Training_x0020_Certificates");
            var _ProjectNumbers = $(this).attr("ows_Project_x0020_Numbers");
                //var modifiedOn = $(this).attr("ows_Modified");

              //Create clone of the table row
                var $row = $("#templates").find(".row-template").clone();

                //Add values to the column based on the css class


                //Change the style for even rows
                if (index % 2 == 0) {

   var pnx1=$("b:contains('Project Number')").parent().next().next().text();  //THIS var must be inside loop!!!
 if (_ProjectNumbers){
 var nx=_ProjectNumbers.indexOf(pnx1); 

if (nx != -1 && pnx1 >1)  /// && _ProjectNumbers
//alert("inside thing")
           index = index + 1;
                //add the row to table

            });  //EACH FUNcTION
            } //FUNCTION CALL BACK



<table table id="documentListtable">
        <tr class="row-template">
            <td class="row-column">
            <td class="row-column">
                Salary Source
            <td class="row-column">
                Training Status
            <td class="row-column">
                Project Numbers
            <!--<td class="row-column">
                Last Updated On
    <div id="templates" style="display: none">
            <tr class="row-template">
                <td class="Personnel" alighn="center" style="width: 100px;">
                <td class="SalarySource" style="width: 100px;">
                <td class="TrainingStatus" style="width: 100px;">
                <td class="ProjectNumbers" style="width: 100px;">
                <!--<td class="LastUpdated" style="width: 100px;">
                </td> -->

<br><a href="https://XXXXX/Item/newifs.aspx?List=ETC.  XXXX &Web=b4c241ca%2D3fea%2D4f09%2Da75a%2D153fc867170b" target="_blank">Click Here to Declare and Modify Project Staffing!</a>