Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Is it possible to use a variable to store the value pairs for a SPServices.UpdateListItems call?

$
0
0
Simon,

I regularly use variables for various SPServices functions, but I insert them inside the parameter strings. I don't believe that you can create a single variable to represent the entire parameter string; only the individual variables. In your case, for example, perhaps use code similar to the following:
$().SPServices ({
    operation: "UpdateListItems",
    async: false,
    batchCmd: "Update",
    listName: "Manage Recruitment Process Tasks",
    ID: $myID,
    valuepairs: [["JobTitleLookup", $jobTitleLookup.val()], ["Pay_x0020_Basis", $payBasis.val()], .... etc etc ],
    completefunc: function(xData, Status) {
            alert(xData.responseText + Status);
            if (Status === "success"){
                alert("Your updates have been saved");
                dispCustomButton($btnPlaceJobAd);
            }
            else
            {
                alert("Your updates could not be saved.  Please check and retry");
                showCustomButton(false);
            }
            
        }
    })
   

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>