SharePoint Online SPOMod: New-SPOListColumn
This article describes a function of a custom SharePoint Online module available for download and installation on GitHub where it welcomes all your suggestions and contributions.
New-SPOListColumn
Creates a new list column.
Parameters
ListTitle | Mandatory | Name of the list |
FieldDisplayName | Mandatory | String. |
FieldType | Mandatory | String. Takes specific values. Use Tab in the Shell to see the options. The values are: 'AllDayEvent','Attachments','Boolean', 'Calculate', 'Choice', 'Computed', 'ContenttypeID', 'Counter', 'CrossProjectLink', 'Currency', 'DateTime', 'Error', 'File', 'Geolocation', 'GridChoice', 'Guid', 'Integer', 'Invalid', 'Lookup', 'MaxItems', 'ModStat', 'MultiChoice', 'Note', 'Number', 'OutcomeChoice', 'PageSeparator', 'Recurrence', 'Text', 'ThreadIndex', 'Threading', 'Url','User', 'WorkflowEventType', 'WorkflowStatus' |
Description | Optional | String. |
Required | Optional | String. |
Group | Optional | String. |
StaticName | Optional | String. |
Name | Optional | String. |
Version | Optional | String. |
AddToView | Optional | String. The name of the view where the column should be added. By default, the column is added to the default view for the list. If ADDTOVIEW parameter is specified, the column will be added to the default view AND additional specified view. |
Examples
----- EXAMPLE 1 ------
Create a column.
New-SPOListColumn -ListTitle MyList6 -FieldDisplayName Field21 -FieldType Note
----- EXAMPLE 2 ------
New-SPOListColumn -ListTitle MyList6 -FieldDisplayName InvoicePaid -Required $true -FieldType Boolean -Description "Mark whether the invoice has been paid" -Group "Customized Custom Columns" -Name IPaid
See Also
SPOMod Cmdlets and Resources
Connect-SPOCSOM
Get-SPOListColumn