UpdateListItems and multiline fields

Sep 10, 2012 at 6:18 PM
This code works for other field types , but not working for my Notes Multiline field 
in a list has version control turned on and the field set to append.  Any help appreciated.
thanks.
<script  type="text/javascript">
$(document).ready(function() {
  $("input[id$='complete']").click(function() {
 $().SPServices({
        operation: "UpdateListItems",
        listName: "Work",
        ID: 1,   
        valuepairs: [["Notes", "Testing Jquery update2"]],    
        completefunc: function (xData, Status){
        alert("Update Done");
        
        }
    });

  });
});

 

Sep 10, 2012 at 7:13 PM
Edited Sep 10, 2012 at 7:14 PM

I've used these types of columns many times. Sometimes you have to do a little debugging client-side though to get this all to work. Crack open your developer tools using F12 and go to the console tab.  The code below will show you the xml that is returned from the web service call.  Knowing what this says, it'll be a little easier tracking down your issue.

$(document).ready(function() {
  $("input[id$='complete']").click(function() {
 $().SPServices({
        operation: "UpdateListItems",
        listName: "Work",
        ID: 1,   
        valuepairs: [["Notes", "Testing Jquery update2"]],    
        completefunc: function (xData, Status){
             //alert( xData.responseText );
             console.log( xData.responseText ); //Can you post the what this says?
        }
    });

  });
});
Cheers,
Matt 
Sep 10, 2012 at 8:13 PM

I'm in IE 8, using f12 > script > start debugging

LOG: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><UpdateListItemsResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/"><UpdateListItemsResult><Results><Result ID="1,Update"><ErrorCode>0x81020014</ErrorCode><ErrorText>One or more field types are not installed properly. Go to the list settings page to delete these fields.</ErrorText><z:row ows_Title="Testing Jquery update2" ows_Crew_x0020_1="1;#Cyberpine" ows_crew_x0020_2="1;#Cyberpine" ows_Status="t3t3t3" ows_Work_x0020_Notes="what" ows_ContentTypeId="0x01000415342967947B47B1DA92A4003831DB" ows_LinkTitleNoMenu="Testing Jquery update2" ows_LinkTitle="Testing Jquery update2" ows_ID="1" ows_ContentType="Item" ows_Modified="2012-09-10 14:10:31" ows_Created="2012-09-05 18:11:33" ows_Author="1;#Cyberpine" ows_Editor="1;#Cyberpine" ows_owshiddenversion="35" ows_WorkflowVersion="1" ows__UIVersion="17920" ows__UIVersionString="35.0" ows_Attachments="0" ows__ModerationStatus="0" ows_SelectTitle="1" ows_Order="100.000000000000" ows_GUID="{BB86EFC1-C900-4731-981E-BECAB055F35B}" ows_FileRef="1;#WorkStatus/Lists/Work/1_.000" ows_FileDirRef="1;#WorkStatus/Lists/Work" ows_Last_x0020_Modified="1;#2012-09-05 18:11:33" ows_Created_x0020_Date="1;#2012-09-05 18:11:33" ows_FSObjType="1;#0" ows_PermMask="0x7fffffffffffffff" ows_FileLeafRef="1;#1_.000" ows_UniqueId="1;#{E1A689BF-6497-41EF-A90D-63F7D7816D8B}" ows_ProgId="1;#" ows_ScopeId="1;#{B479B917-CD13-4AAD-83E3-DE2BEB09F285}" ows__EditMenuTableStart="1_.000" ows__EditMenuTableEnd="1" ows_LinkFilenameNoMenu="1_.000" ows_LinkFilename="1_.000" ows_ServerUrl="/WorkStatus/Lists/Work/1_.000" ows_EncodedAbsUrl="http://mydomain/WorkStatus/Lists/Work/1_.000" ows_BaseName="1_" ows_MetaInfo="1;#" ows__Level="1" ows__IsCurrentVersion="1" xmlns:z="#RowsetSchema" /></Result></Results></UpdateListItemsResult></UpdateListItemsResponse></soap:Body></soap:Envelope>

 

Sep 10, 2012 at 9:03 PM

I don't see a Static Column named: Notes in the xml. I do see: ows_Work_x0020_Notes. Is that the column you are really trying to modify?  The value is currently set to: what

If so, change your script to this and it should work:

$(document).ready(function() {
  $("input[id$='complete']").click(function() {
 $().SPServices({
        operation: "UpdateListItems",
        listName: "Work",
        ID: 1,   
        valuepairs: [["Work_x0020_Notes", "Testing Jquery update2"]],    
        completefunc: function (xData, Status){
             //alert( xData.responseText );
             console.log( xData.responseText ); //Can you post the what this says?
        }
    });

  });
});
Cheers,
Matt 

Coordinator
Sep 10, 2012 at 9:08 PM

Looks like you got it, Matt! Or else the Notes column isn't there?

M.