posts
Update Choice values of List Items in SharePoint List
#Parameters $SiteURL = “https://contoso.sharepoint.com/teams/app-ar" $ListName = “Remittances”
$dateTime = (Get-Date).toString(“dd-MM-yyyy”) $invocation = (Get-Variable MyInvocation).Value $directorypath = Split-Path $invocation.MyCommand.Path $fileName = “\RemittanceDuplicateReport-” + $dateTime + “.csv” $OutPutView = $directorypath + $fileName
Connect-PnPOnline -url $SiteURL -Interactive
$ListItems = Get-PnPListItem -List $ListName -PageSize 500 | Where {$_.FieldValues.Month -eq ‘202402’ } #Array for Results Data $DataCollection = @() ForEach($Item in $ListItems) { #Collect data $Data = New-Object PSObject -Property @{ SourceRef = $Item[“DocumentSourceReference”] GroupingRef = $Item[“GroupingReference”] Provider = $Item[“Provider”].
posts
Update Choice values of List Items in SharePoint List
Maintaining up-to-date list items, especially when dealing with choice fields, can be a daunting task sepcially after choice field values are updated. We need a way to update these old values to the correct new ones.
The Challenge SharePoint lists use choice fields to categorise items. Over time, the need to update these choice values can arise, whether due to changes in terminology, business processes, or error correction. Manually updating these values across numerous list items is not only time-consuming but also prone to human error.
posts
Overcoming SharePoint's List View Threshold with CAML Queries in PowerShell
Overcoming SharePoint’s List View Threshold with CAML Queries in PowerShell Encountering the list view threshold error in SharePoint when dealing with lists exceeding 5,000 items is a common challenge. Using CAML queries within PowerShell scripts offers a server-side solution to efficiently filter and retrieve data, yet is prone to the list view threshold error.
Sample script This is the sample PowerShell script querying the specified SharePoint list using CAML query.