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');
}
});
//}

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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