UpdateListItems in folder

Jun 4, 2012 at 9:10 AM

Hi Everyone,

Need help on updating list items with new record inside a folder. I am using UpdateListItems opeation with all required attributes. Item gets created but not in folders.

here is my code:

$().SPServices({
        webURL:url,
        operation: "UpdateListItems",
        async: false,
        batchCmd: "New",
        listName: listName_Rsps,
        valuepairs: [["Title", "test"],["Body","test2"]],
        completefunc: function(xData, Status) {
        LoadValues(flag);
        document.getElementById("txtResponse").value="";
        }
        });

 

Appreciate your help in advance

 

thanks,

Sudhakar

Coordinator
Jun 5, 2012 at 5:16 AM

Sudhakar:

Check this thread: http://spservices.codeplex.com/discussions/358213. There are a number of others as well.

M.

Jun 26, 2012 at 7:19 AM
Edited Jun 26, 2012 at 7:21 AM

Hi Marc,

cant we provide list name with spaces like 'All Evaluation' and column names too. the script is throwing following error.

'null' is null or not an object.

following is the code i am using

$().SPServices({
              operation: "UpdateListItems",
              async: false,
              batchCmd: "New",
              listName: "All Evaluation",
              valuepairs: [["CDSID", cdsid]],
              completefunc: function(xData, Status) {
                      alert("record created"); }
      });

 

Coordinator
Jun 26, 2012 at 2:34 PM

Spaces in the listName are fine if that's the actual list name. Column names must be the StaticName of the column, e.g., My_x0020_Column, as noted in the docs.

Are you sure your references to the jQuery and SPServices .js files are valid?

M.

Jun 29, 2012 at 5:55 AM

 The reference to .js files are valid. the problem was i did not change the '%5F' to '_' in the column names.

Thanks for the info.