0

My document library in a SharePoint site has reached threshold limit and because of which I am not able to update number field to remove comma separator.

Is there any way either through PowerShell or something to update number field and remove the comma separator?

Updated: $siteurl = "https://contoso-admin.sharepoint.com/sites/abcsite"

Connect-PnPOnline -Url $siteurl -Interactive

Set-PnPField -List "DMS_MPC" -Identity "DocumentNumber" -Values @{CommaSeparator=$false}

ERROR: enter image description here

1 Answer 1

1

Try using below PnP PowerShell code. It works for normal document library. I was not able to test it for document library reaching threshold limit (I don't have enough documents on test environment).

Connect-PnPOnline -Url https://<tenant>.sharepoint.com/sites/<siteName> -UseWebLogin

Set-PnPField -List "Documents" -Identity "NumberCol" -Values @{CommaSeparator=$false}

Output:

enter image description here

Documentation: Set-PnPField

8
  • Hi, Thank you. I get the following error when i try PS C:\WINDOWS\system32> Set-PnPField -List "DMS_MPC" -Identity "DocumentNumber" -Values @{CommaSeparator=$false} Set-PnPField : Unable to retrieve the list specified using the List parameter Parameter name: List At line:1 char:1 + Set-PnPField -List "DMS_MPC" -Identity "DocumentNumber" -Values @{Com ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : WriteError: (:) [Set-PnPField], ArgumentException + FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.Fields.SetField Commented Sep 27, 2021 at 6:09
  • when i try complete sharepoint URL along with site, i get 404 error and when the try with only abc-admin.sharepoint.com it returns above error. Please advice Commented Sep 27, 2021 at 6:17
  • In Connect-PnPOnline command, you have to use URL of site where you created document library. In Set-PnPField command, you have to pass the display name of library in -List parameter. Commented Sep 27, 2021 at 6:23
  • 1
    Do not add -admin in site URL. It should be simply like: https://contoso.sharepoint.com/sites/abcsite. Commented Sep 27, 2021 at 7:48
  • 1
    Great Great!! It worked.. Thank you so much Ganesh Commented Sep 27, 2021 at 8:00

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.