I'm trying to build a script that will copy the contents of a list from a site to another list in a subsite or a different site.
Unfortunately many multiline text fields (FieldType = Note) appear to be empty even though they're not, when versioning is enabled. Versioning is enabled on the source list and all BUT ONE of these Note Type fields have versioning enabled. They all store simple text (not RTF or HTML).
Oddly enough, some rows are readable and some are not, seemingly at random.
$source = "https://tenant.sharepoint.com/sites/source-site"
$sourceListName = "sourceList"
Connect-PnPOnline -Url $source -UseWebLogin
$SourceListItems = Get-PnPListItem -List $SourceListName
#first item:
$SourceListItems[0]["Diagnosi"] # returns nothing
$SourceListItems[0]["Diagnosi"].ToString() # returns an error "impossible to use a method on an expression with null value" or something like that
$SourceListItems[0].FieldValues # returns what you can see in the attachment, among the other fields
How can I effectively collect the values stored in those fields where versioning is enabled? TA