Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds command spo list defaultvalue clear #6534

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 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,62 @@
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.

`-f, --force`
: Don't prompt for confirmation.
```

<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
Loading