Forum Discussion

Matt Munslow's avatar
Matt Munslow
Icon for Microsoft rankMicrosoft
Nov 25, 2016

Adding Descriptions to Fields

Is it possible to add a description to the field in a custom list using Add-PnPField?  Or does anyone have a way of programmatically adding a description after the field has been created.

3 Replies

  • This works:

    $field = Get-PnPField -List Risks -Identity Likelihood

    $field.Description

    $field.Description="This works"

    $field.Update()

    • KristofBoschman's avatar
      KristofBoschman
      Copper Contributor
      Just use this: Set-PnPField -Identity "MyField" -Values @{Description="MyDescription"}
  • Hi  Matt Munslow,

     

    The description seems to be missing.

     

    Maybe a bit of a heavy way of doing this but you could use

     

    Get-PnPProvisioningTemplate -Out test.xml

     

    Then update the xml by editing it manually

     

    Apply-PnPProvisioningTemplate -Path test.xml

     

    I'm assuming that you prefer to stick to PowerShell. 

     

Resources