You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sets default column values for a specific document library
Options
Option
Description
-u, --webUrl <webUrl>
URL of the site where the list is located.
-i, --listId [listId]
ID of the list. Specify either listTitle, listId, or listUrl.
-t, --listTitle [listTitle]
Title of the list. Specify either listTitle, listId, or listUrl.
--listUrl [listUrl]
Server- or site-relative URL of the list. Specify either listTitle, listId, or listUrl.
--field <field>
Internal name of the field.
--value <value>
Value of the field.
--folderUrl [folderUrl]
Set the value on a specific folder. By default, the root folder of the list is used.
Examples
Set a default folder value on the root folder of a list for a text field
m365 spo list defaultcolumnvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --field Company --value Contoso
Set a default folder value for a taxonomy field on a specific folder
m365 spo list defaultcolumnvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --folderUrl "/sites/Marketing/Logos/Contoso" --field Country --value "-1;#Belgium|442affc2-7fab-4f33-9590-330403a579c2"
Set a default folder value for a multi-taxonomy field on a specific folder
m365 spo list defaultcolumnvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --folderUrl "/sites/Marketing/Logos/Contoso" --field Countries --value "-1;#Belgium|442affc2-7fab-4f33-9590-330403a579c2;#-1;#France|14888324-5c48-46db-b748-215cbe24eb4c"
Set a default folder value for a date field to today
m365 spo list defaultcolumnvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --field Published --value "[today]"
Set a default folder value for a date field
m365 spo list defaultcolumnvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --field Published --value "2020-05-03T11:00:00Z"
Set a default folder value for a choice field
m365 spo list defaultcolumnvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --field FileType --value "Logo"
Set a default folder value for a multi-choice field
m365 spo list defaultcolumnvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --field FileTypes --value "Logo;#Brand"
Set a default folder value for a yes/no field
m365 spo list defaultcolumnvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --field Active --value 1
Set a default folder value for a user field
m365 spo list defaultcolumnvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --field Responsible --value "1;#[email protected]"
Set a default folder value for a multi-user field
m365 spo list defaultcolumnvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --field Responsible --value "1;#[email protected];#2;#[email protected]"
Default properties
No response
Additional Info
Warning
Folders with special characters are not supported.
The text was updated successfully, but these errors were encountered:
@milanholemans isn't it possible to set default value for a column on a list using m365 spo field set --webUrl "https://tenanttocheck.sharepoint.com/sites/PnPDemo2" --listTitle "aaa" --title "aaa" --DefaultValue "bbb"
Usage
m365 spo list defaultcolumnvalue set [options]
Description
Sets default column values for a specific document library
Options
-u, --webUrl <webUrl>
-i, --listId [listId]
listTitle
,listId
, orlistUrl
.-t, --listTitle [listTitle]
listTitle
,listId
, orlistUrl
.--listUrl [listUrl]
listTitle
,listId
, orlistUrl
.--field <field>
--value <value>
--folderUrl [folderUrl]
Examples
Set a default folder value on the root folder of a list for a text field
m365 spo list defaultcolumnvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --field Company --value Contoso
Set a default folder value for a taxonomy field on a specific folder
Set a default folder value for a multi-taxonomy field on a specific folder
Set a default folder value for a date field to today
Set a default folder value for a date field
Set a default folder value for a choice field
Set a default folder value for a multi-choice field
Set a default folder value for a yes/no field
m365 spo list defaultcolumnvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --field Active --value 1
Set a default folder value for a user field
Set a default folder value for a multi-user field
Default properties
No response
Additional Info
Warning
Folders with special characters are not supported.
The text was updated successfully, but these errors were encountered: