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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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