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

Asjad Ali 1 Reputation point
2021-06-08T08:20:55.297+00:00

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?

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MichaelHan-MSFT 18,126 Reputation points
    2021-06-09T02:37:06.267+00:00

    Hi @Asjad Ali ,

    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.