Note that there are some explanatory texts on larger screens.

plurals
  1. POCannot write more than two fields, using SPServices UpdateListItems
    primarykey
    data
    text
    <p>I'm creating list items in a SharePoint (MOSS) list programmatically. I've been successful with several different techniques, as long as I limit the number of fields to two. I need to provide 76 field values, actually. Am trying SPServices UpdateListItems method. Latest versions of jQuery (1.7.1) and SPServices (0.7.0).</p> <p>My first approach was to use the valuepairs option. I have two arrays I can use to feed this. Worked fine for two values. I then tried statically filling variables and using those. Same result. Switched to the CAML Batch method. Same result.</p> <p>The complete function status is always "Success." Nothing gets written to the list.</p> <pre><code>var batch = "&lt;Batch OnError='Continue'&gt;&lt;Method ID='1' Cmd='New'&gt;"; batch += "&lt;Field Name='" + varTitle + "'&gt;" + varTitle_val + "&lt;/Field&gt;"; batch += "&lt;Field Name='" + varformid + "'&gt;" + varformid_val + "&lt;/Field&gt;"; batch += "&lt;Field Name='" + varee1 + "'&gt;Hi!&lt;/Field&gt;"; batch += "&lt;Field Name='" + varee2 + "'&gt;there&lt;/Field&gt;"; batch += "&lt;Field Name='" + varee3 + "'&gt;how&lt;/Field&gt;"; batch += "&lt;Field Name='" + varee4 + "'&gt;are&lt;/Field&gt;"; batch += "&lt;/Method&gt;&lt;/Batch&gt;"; $().SPServices({ operation: "UpdateListItems", batchCmd: "New", listName: "CRMSAccessRequest", // valuepairs: [[arFields[0],arValues[0]],[arFields[1],arValues[1]],[arFields [2],arValues[2]]], //fails with more than two fields // valuepairs: [[varTitle,varTitle_val],[varformid,arValues[1]],[varee1,varee1_val],[varee2,varee2_val]], // ditto updates: batch, completefunc: function(xData, Status) { alert("status of write attempt: " + Status); } }); //SPServices </code></pre> <p>Any suggestions?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload