Thanks for answers, All!
I have to work with the "datasheet" view because that is needed at a time to make a large number of records. (hate this)
Ok SPUpdateMultipleListItems is not for me. but i still love SPServices for his versatility 8-)
sympmarc, in accordance with your recommendation i make this:
I have to work with the "datasheet" view because that is needed at a time to make a large number of records. (hate this)
Ok SPUpdateMultipleListItems is not for me. but i still love SPServices for his versatility 8-)
sympmarc, in accordance with your recommendation i make this:
- On load page i get all need data in array
query_mm = "<Query>" + //my CAML with month
"<OrderBy>" +
"<FieldRef Name='Created' Ascending='FALSE'/>" +
"</OrderBy>" +
"<Where><Eq>" +
"<FieldRef Name='_x041c__x0435__x0441__x044f__x04'/><Value Type='Calculated'>12</Value>" + //december
"</Eq></Where>" +
"</Query>";
function getList(completeFunction){
var query = query_mm;
result = new Array();
$().SPServices({ operation: "GetListItems", async: false, listName: "{fb58992a-4027-411e-9859-56328b461868}",CAMLQuery:query,
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
var row = new Array();
row[0] = $(this).attr("ows_ID"); //id field
row[1] = $(this).attr("ows_Title"); //my field for calculate
result[$(this).attr("ows_ID")] = row; //my array
});
if(completeFunction) completeFunction(result);
}
});
Array.prototype.clean = function(deleteValue){ //remove empty rows
for (var i = 0; i < this.length; i++)
{
if (this[i] == deleteValue)
{
this.splice(i, 1);
i--;
}
}
return this;
};
result.clean(null);
alert('Data for December: (ID/Value) '+result.join("-")); // my data may be with "reduce" i modify this values
}
after that i have "result" array with all my data. (1-10, 2-42,...etc. ID-Value)- With button click, I hope modify result and send in list via loop "UpdateListItems".
If someone can help me I will be saved. How send in list array with "id-value" row.