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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 886 views
  • 0 likes
  • 1 in conversation