How to get value of Note field that has AppendOnly="TRUE" in the SchemaXml #655
-
In few libraries I have a field named "DPCNotes" that was created with AppendOnly and now it shows with a link "View Entries" in the views.
The values are null. Found out it is in the "AppendOnlyHistory" property but even with REST call like: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi These comments are stored as Versions and the way to retrieve the versions is to access the information in the version property of the list item. I quickly made this script below to show the values on your console. if I was you I would modify it to perhaps write the values to a CSV file and list the version comments before changing the field to AppendOnly="FALSE $ctx = Get-PnPContext
$list = Get-PnPList -Identity 'Issue tracker'
$listItems = Get-PnPListItem -List $list
foreach($listItem in $listItems)
{
$DPCNotes = $null
$ctx.Load($listItem.Versions)
$ctx.ExecuteQuery()
Write-Host $listItem.FieldValues.Title
foreach($version in $listItem.Versions)
{
$DPCNotes += $version["DPCNotes"] # Assign To Variable
}
$DPCNotes
}
|
Beta Was this translation helpful? Give feedback.
Hi
These comments are stored as Versions and the way to retrieve the versions is to access the information in the version property of the list item. I quickly made this script below to show the values on your console. if I was you I would modify it to perhaps write the values to a CSV file and list the version comments before changing the field to AppendOnly="FALSE