BookmarkSubscribeRSS Feed
dwaynejarman
Fluorite | Level 6

Hi,

 

I'm trying to update MS SharePoint list data using SAS, and I'm not quite sure how to go about it.  I've copied some of the code that i use to update a list item from javascript and a html page.  This was taken from functioning script.


//This is sent to SharePoint so it doesn't update all of the variables, just the ones submitted.
var beforeSendFunction = function (xhr) {
xhr.setRequestHeader("If-Match", "*");
// Using MERGE so that the entire entity doesn't need to be sent over the wire.
xhr.setRequestHeader("X-HTTP-Method", 'MERGE');
}

$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
processData: false,
beforeSend: beforeSendFunction,
url: firmURL,
data: JSON.stringify(firmModifications), //this is a json object converted to a string of what is submitted to the server.
dataType: "json",
error:function (jqXHR,textStatus,errorThrown){
alert('There was an error in the firm update you just tried to make.');
},
success: function (data,textStatus, jqXHR){
alert('success');
}
});
//}

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 0 replies
  • 871 views
  • 0 likes
  • 1 in conversation