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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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