Using MS SharePoint as Data Source : Part 3

2
48
Using Sharepoint

This is the third and last part of the series: Using MS SharePoint as Data Source. In the earlier posts we learned the basics of SharePoint and the easy way to retrieve data to SharePoint list. In this post we are going to discuss the easiest way of posting data to the SharePoint list.

Posting data to SharePoint can be done in similar way but instead of Query we will use batch element in our CAML.

 

Batch element provides batch processing of commands within HTTP protocol

 

To determine the record that needs to be updated, we should use the ID column at SharePoint. ID is a default column at SharePoint list which is auto generated for each record. If you don’t see the field you can enable this at list settings.

Batch element should look like below in your request for posting data. Note that the first field name is the ID which determines which records need to be updated. Consecutive fields are the fields for which value should be updated as passed.

 

 

Rest should be straightforward as explained in the last post. Here is a generic function for your reference.

 

 

The generic functions provided in this series can be directly used in UFT and TestComplete. Tested on UFT 12.52 and TestComplete 11 with SharePoint 2010 and SharePoint 2013. Hope you enjoyed the series, let us know your feedback/Comments or questions if any.

2 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.