Update SharePoint list item based on id value

Published by

on

Here’s how to update a list item based on a id using SP Services. This is a snippet of code from one of my projects. It updates a list based on ‘itemID’.

function UpdateCurrentResultList(itemValue,itemID,k)

    {
        $().SPServices({
            operation: "UpdateListItems",
            async: false,
            listName: "Current Results List",
            ID: itemID,
            valuepairs: [["CurrentResultQtr"+k,itemValue]],
            completefunc: function(xData, status){
                //alert("Sending the xml request to the server was: " + status);
                //alert("Sharepoint processing of the message returned: " + xData.responseText);
        }
        });
    }

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.