Skip to content

How to get value of Note field that has AppendOnly="TRUE" in the SchemaXml #655

Answered by LeonArmston
Ofer-Gal asked this question in Q&A
Discussion options

You must be logged in to vote

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)
    {
        $…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Ofer-Gal
Comment options

Answer selected by Ofer-Gal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants