Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
IbisRipley
Frequent Visitor

How to call SOAP(not REST) sharepoint Lists Service method GetVersionCollection

I have spent quite a few days reading posts on this and I still can't figure it out:

Requirement

  • I need to get all prior versions of a given list item into power bi to report on them. ( I already have all other data)

Background

  • It seems sharepoint has 2 web APIs for listdata, REST and SOAP(older) 
  • the SOAP SP service has a method called GetVersionCollection that takes a listID and itemID that returns the exact data I need
  • In my current model, I have a table that has all of these parameters (listIDs, ItemIDs)
  • As far as I know, the way to do it via REST is to use this page: Web.Page(Web.Contents(https://foo.com/sites/site/_layouts/versions.aspx?list=","xxxxx-xx-xx-xx-xxxxxxx", "&ID=17"}) ) and also web.Contents But the problem with this approach is that the page is a report and has all the data rows split (2 field in 1 row, 2 fields in the next. Like this (below are row id 6 and 5 - the row below has the value)

image.png

 

So, My Question is:  How can I EITHER

Call the SOAP version GetVersionCollection in PBI (not PBI, but something like:

 

$().SPServices({  operation: "GetVersionCollection",
  async: false,  strlistID: "Projects",  strlistItemID: 1,  strFieldName: "Description",  completefunc: function (xData, Status) {    $(xData.responseText).find("Version").each(function(i) {      console.log("Name: " + $(this).attr("Description") + " Modified: " + $(this).attr("Modified"));
    });  
  }
}); 

https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/bb263650(v%3Doff...

 

OR

Get the REST resultSet split/parsed so it's in one table.

 

Like I said, I have been doing trial and error for quite a while.  Any tips would help.

1 REPLY 1
v-frfei-msft
Community Support
Community Support

Hi @IbisRipley ,

 

Hope this document can help you.

https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/bb263650(v%3Doff...

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors