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.
--fieldName <fieldName>
Internal name of the field.
--fieldValue <fieldValue>
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 defaultvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --fieldName Company --fieldValueContoso
Set a default folder value for a taxonomy field on a specific folder
m365 spo list defaultvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --folderUrl "/sites/Marketing/Logos/Contoso" --fieldName Country --fieldValue"-1;#Belgium|442affc2-7fab-4f33-9590-330403a579c2"
Set a default folder value for a multi-taxonomy field on a specific folder
m365 spo list defaultvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --folderUrl "/sites/Marketing/Logos/Contoso" --fieldName Countries --fieldValue"-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 defaultvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --fieldName Published --fieldValue"[today]"
Set a default folder value for a date field
m365 spo list defaultvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --fieldName Published --fieldValue"2020-05-03T11:00:00Z"
Set a default folder value for a choice field
m365 spo list defaultvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --fieldName FileType --fieldValue"Logo"
Set a default folder value for a multi-choice field
m365 spo list defaultvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --fieldName FileTypes --fieldValue"Logo;#Brand"
Set a default folder value for a yes/no field
m365 spo list defaultvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --fieldName Active --fieldValue1
Set a default folder value for a user field
m365 spo list defaultvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --fieldName Responsible --fieldValue"1;#[email protected]"
Set a default folder value for a multi-user field
m365 spo list defaultvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --fieldName Responsible --fieldValue"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 defaultvalue 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
.--fieldName <fieldName>
--fieldValue <fieldValue>
--folderUrl [folderUrl]
Examples
Set a default folder value on the root folder of a list for a text field
m365 spo list defaultvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --fieldName Company --fieldValueContoso
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 defaultvalue set --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --fieldName Active --fieldValue1
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: