question

AsjadAli-1825 avatar image
0 Votes"
AsjadAli-1825 asked MichaelHan-MSFT commented

How can I get complete changeLog of appended column in SharePoint Online List using JSOM?

Hi there,
I am trying to get values from SharePoint Online List using CAML query. When I choose type from

  Specify the type of text to allow: 

Plain text it returns only one value
Rich text it returns value with html tag
Enhanced rich text it returns html with classes and id

103259-screenshot-2021-06-08-131423.png




Please tell me how can I get appended column in jsom?








office-sharepoint-online
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MichaelHan-MSFT avatar image
0 Votes"
MichaelHan-MSFT answered MichaelHan-MSFT commented

Hi @AsjadAli-1825,

The changeLog of appended column is stored in the history of list item, you could get the versions of the listitem to get the value of appended column. Below is my demo for you:

 var clientContext = new SP.ClientContext();
 var oList  = clientContext.get_web().get_lists().getByTitle('List1');
 this.oListItem  = oList.getItemById(1);
 clientContext.load(oListItem,'Versions');
 clientContext.executeQueryAsync(onsuccess, onfailed);
    
 function onsuccess() {
     var versions=oListItem.get_versions();
     versions.get_data().forEach(itemVersion=>{
         console.log(itemVersion.get_item('Column1'));
     })
    
 }
     
 function onfailed(sender, args) {
     console.log('Failed' + args.get_message() + '\n' + args.get_stackTrace());
 }



If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AsjadAli-1825,

Is there anything update? Have you tried the solution I provided?

If my answer helps you, you could accept it :)

0 Votes 0 ·