Skip to content

Commit

Permalink
Adds command 'spo list defaultvalue clear'. Closes #6505
Browse files Browse the repository at this point in the history
  • Loading branch information
milanholemans committed Dec 23, 2024
1 parent a15ecbf commit eccaa2f
Show file tree
Hide file tree
Showing 5 changed files with 599 additions and 0 deletions.
59 changes: 59 additions & 0 deletions docs/docs/cmd/spo/list/list-defaultvalue-clear.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import Global from '/docs/cmd/_global.mdx';

# spo list defaultvalue clear

Clears default column values for a specific document library

## Usage

```sh
m365 spo list defaultvalue clear [options]
```

## Options

```md definition-list
`-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 to clear over the entire list. Specify either `fieldName` or `folderUrl`, but not both.

`--folderUrl [folderUrl]`
: Clear all fields of a specific folder. Specify either `fieldName` or `folderUrl`, but not both.
```

<Global />

## Examples

Remove all default column values from a library

```sh
m365 spo list defaultvalue clear --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos
```

Clear a field from all folders of a library

```sh
m365 spo list defaultvalue clear --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --field Company
```

Clear all fields from a specific folder in a library

```sh
m365 spo list defaultvalue clear --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle Logos --folderUrl "/sites/Marketing/Logos/Contoso"
```

## Response

The command won't return a response on success.
5 changes: 5 additions & 0 deletions docs/src/config/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2871,6 +2871,11 @@ const sidebars: SidebarsConfig = {
label: 'list contenttype default set',
id: 'cmd/spo/list/list-contenttype-default-set'
},
{
type: 'doc',
label: 'list defaultvalue clear',
id: 'cmd/spo/list/list-defaultvalue-clear'
},
{
type: 'doc',
label: 'list retentionlabel ensure',
Expand Down
1 change: 1 addition & 0 deletions src/m365/spo/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export default {
LIST_CONTENTTYPE_LIST: `${prefix} list contenttype list`,
LIST_CONTENTTYPE_REMOVE: `${prefix} list contenttype remove`,
LIST_CONTENTTYPE_DEFAULT_SET: `${prefix} list contenttype default set`,
LIST_DEFAULTVALUE_CLEAR: `${prefix} list defaultvalue clear`,
LIST_GET: `${prefix} list get`,
LIST_LIST: `${prefix} list list`,
LIST_REMOVE: `${prefix} list remove`,
Expand Down
Loading

0 comments on commit eccaa2f

Please sign in to comment.