Update list items for html table.

Apr 1, 2012 at 4:32 AM

I  Have a html table i have created for to other sharepoint list. I need to load these records to a third sharepoint list. It is not submitting though not sure where i am going wrong. The list is a Project task list the i have added severla colums too. I got the feild names for the url bar. I can not figure out why it is not submitting. My friend did somthing very simmala and work greate.

  $('#SubmitButton').click(function () {
                alert("Handler for .click() called.");

                var strTitle = " ";
                var strStartDate = " ";
                var strDueDate = " ";
                var strPercentComplete = " ";
                var strStatus = " ";
                var strPriority = " ";
                var strPredecessors = " ";
                var strDuration = " ";
                var strPType = " ";
                var strProgramname = " ";
                var strConceptID = " ";
                var strPhase = " ";


                $('#tabldata1 tr').each(function () {
                    if ($(this).find("td").eq(0).html() != null) {
                        strTitle = $(this).find("td").eq(0).html();
                        //alert(strTitle );
                        strStartDate = $(this).find("td").eq(1).html();
                        //alert(strStartDate );
                        strDueDate = $(this).find("td").eq(2).html();
                        //alert(strDueDate );
                        strPercentComplete = $(this).find("td").eq(3).html();
                        //alert(strPercentComplete );
                        strStatus = $(this).find("td").eq(4).html();
                        //alert(strStatus );
                        strPriority = $(this).find("td").eq(5).html();
                        //alert(strPriority );
                        strPredecessors = $(this).find("td").eq(6).html();
                        //alert(strPredecessors );
                        strDuration = $(this).find("td").eq(7).html();
                        //alert(strDuration );
                        strPType = $(this).find("td").eq(8).html();
                        //alert(strPType );
                        strProgramname = $(this).find("td").eq(9).html();
                        //alert(strProgramname );
                        strConceptID = $(this).find("td").eq(10).html();
                        //alert(strConceptID );
                        strPhase = $(this).find("td").eq(11).html();
                        CreateNewItem(strTitle, strStartDate, strDueDate, strPercentComplete, strStatus, strPriority, strPredecessors, strDuration, strPType, strProgramname, strConceptID, strPhase);
                    }
                });
                alert('Data has been submitted.');




function CreateNewItem(strTitle, strStartDate, strDueDate, strPercentComplete, strStatus, strPriority, strPredecessors, strDuration, strPType, strProgramname, strConceptID, strPhase) 
{alert('inside function');
    $().SPServices({
        operation: "UpdateListItems",
        async: false,
        batchCmd: "New",
        listName: "{0E745333-BF95-4C65-9946-337100142241}",
        valuepairs: [["Title", strTitle], ["PercentComplete", strPercentComplete], ["Status", strStatus], ["Priority", strPriority], ["Predecessors", strPredecessors], ["Duration", strDuration], ["Program%5Fx0020%5FType", strPType], ["Concept%5Fx0020%5FProgram%5Fx0020%5FName", strProgramname], ["Concept%5Fx0020%5FID", strConceptID], ["Phase", strPhase]],
        completefunc: function (xData, Status) {
          
        }
    });
}
});

});   //Document Ready end 
Apr 1, 2012 at 10:49 PM

I have been playing around. I finally add the alert and this is whats causing the issue i belive.

I am getting this error

 (0x8102001A): Invalid number value. A number field contains invalid data. Please check the value and try again

Apr 2, 2012 at 12:09 AM

We'll Turned out to be a PEBCK(Problem Exist between the chair and keyboard) error.......  The problem was between the two list themseleves.I had the types all mismatched  when the should have been the exact same.  

Coordinator
Apr 2, 2012 at 8:30 PM

Oops. Hey, it happens. Glad you got it worked out.

M.