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 remove #6559

Closed
Closed
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-remove.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 remove

Removes a specific default column value for a specific document library

## Usage

```sh
m365 spo list defaultvalue remove [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.

`--folderUrl [folderUrl]`
: Server- or site-relative URL of a specific folder to remove the field from. By default, the root folder of the list is used.

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

<Global />

## Examples

Remove a default column value from the root folder of the list

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

Remove a column default value from a specific folder using web-relative URL

```sh
m365 spo list defaultvalue remove --webUrl https://contoso.sharepoint.com/sites/Marketing --listUrl '/Logos' --fieldName Company --folderUrl '/Logos/Branding'
```

Remove a column default value from a specific folder by server relative URL

```sh
m365 spo list defaultvalue remove --webUrl https://contoso.sharepoint.com/sites/Marketing --listId fc6d514f-e7da-47d4-b48b-f72e2fb9c82a --field Company --folderUrl '/sites/Marketing/Logos/Branding'
```

## 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 @@ -2903,6 +2903,11 @@ const sidebars: SidebarsConfig = {
label: 'list defaultvalue list',
id: 'cmd/spo/list/list-defaultvalue-list'
},
{
type: 'doc',
label: 'list defaultvalue remove',
id: 'cmd/spo/list/list-defaultvalue-remove'
},
{
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 @@ -139,6 +139,7 @@ export default {
LIST_CONTENTTYPE_REMOVE: `${prefix} list contenttype remove`,
LIST_CONTENTTYPE_DEFAULT_SET: `${prefix} list contenttype default set`,
LIST_DEFAULTVALUE_LIST: `${prefix} list defaultvalue list`,
LIST_DEFAULTVALUE_REMOVE: `${prefix} list defaultvalue remove`,
LIST_GET: `${prefix} list get`,
LIST_LIST: `${prefix} list list`,
LIST_REMOVE: `${prefix} list remove`,
Expand Down
Loading
Loading