Skip to content

Commit 346b519

Browse files
committed
Adds spp autofillcolumn apply command. Closes #6203
1 parent e0616e6 commit 346b519

File tree

6 files changed

+813
-0
lines changed

6 files changed

+813
-0
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
import Global from '/docs/cmd/_global.mdx';
2+
import Tabs from '@theme/Tabs';
3+
import TabItem from '@theme/TabItem';
4+
5+
# spp autofillcolumn set
6+
7+
Applies the autofill option to the selected column
8+
9+
## Usage
10+
11+
```sh
12+
m365 spp autofillcolumn set [options]
13+
```
14+
15+
## Options
16+
17+
```md definition-list
18+
`-u, --siteUrl <siteUrl>`
19+
: The URL of the target site.
20+
21+
`--listTitle [listTitle]`
22+
: The title of the library on which to apply the model. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.
23+
24+
`--listId [listId]`
25+
: The ID of the library on which to apply the model. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.
26+
27+
`--listUrl [listUrl]`
28+
: Server or web-relative URL of the library on which to apply the model. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.
29+
30+
`-i, --columnId [columnId]`
31+
: ID of the column to which the autofill option will be assigned. Specify either `columnId`, `columnTitle` or `columnInternalName`.
32+
33+
`-t, --columnTitle [columnTitle]`
34+
: Title of the column to which the autofill option will be assigned. Specify either `columnId`, `columnTitle` or `columnInternalName`.
35+
36+
`--columnInternalName [columnInternalName]`
37+
: The internal name (case-sensitive) of the column to which the autofill option will be assigned. Specify either `columnId`, `columnTitle` or `columnInternalName`.
38+
39+
`--prompt [prompt]`
40+
: The text in natural language that will be used to extract specific information or generate information from files within a SharePoint library.
41+
42+
`--isEnabled [isEnabled]`
43+
: Enables or disables the autofill column feature.
44+
```
45+
46+
<Global />
47+
48+
## Remarks
49+
50+
The `prompt` parameter is required when setting the autofill column for the first time.
51+
52+
## Examples
53+
54+
Applies an autofill column on a selected column to a document library based on the list id.
55+
56+
```sh
57+
m365 spp autofillcolumn set --siteUrl "https://contoso.sharepoint.com/sites/mainSite" --listId "7645e69d-21fb-4a24-a17a-9bdfa7cb63dc" --columnId "1045e69d-21fb-4214-a25a-9bdfa7cb63a2" --prompt "Write a 2-line summary of the document"
58+
```
59+
60+
Applies an autofill column on a selected column to a document library based on the list title.
61+
62+
```sh
63+
m365 spp autofillcolumn set --siteUrl "https://contoso.sharepoint.com/sites/mainSite" --listTitle "Documents" --columnId "1045e69d-21fb-4214-a25a-9bdfa7cb63a2" --prompt "Write a 2-line summary of the document"
64+
```
65+
66+
Applies an autofill column on a selected column to a document library based on the list url.
67+
68+
```sh
69+
m365 spp autofillcolumn set --siteUrl "https://contoso.sharepoint.com/sites/mainSite" --listUrl '/Shared Documents' --columnId "1045e69d-21fb-4214-a25a-9bdfa7cb63a2" --prompt "Write a 2-line summary of the document"
70+
```
71+
72+
Applies an autofill column on a selected column to a document library based on the list id and column title.
73+
74+
```sh
75+
m365 spp autofillcolumn set --siteUrl "https://contoso.sharepoint.com/sites/mainSite" --listId "7645e69d-21fb-4a24-a17a-9bdfa7cb63dc" --columnTitle "ColumnTitle" --prompt "Write a 2-line summary of the document"
76+
```
77+
78+
Applies an autofill column on a selected column to a document library based on the list id and column internal name.
79+
80+
```sh
81+
m365 spp autofillcolumn set --siteUrl "https://contoso.sharepoint.com/sites/mainSite" --listId "7645e69d-21fb-4a24-a17a-9bdfa7cb63dc" --columnInternalName "ColumnTitle" --prompt "Write a 2-line summary of the document"
82+
```
83+
84+
Disables the autofill column for a selected column in a document library, based on the list id and column title.
85+
86+
```sh
87+
m365 spp autofillcolumn set --siteUrl "https://contoso.sharepoint.com/sites/mainSite" --listId "7645e69d-21fb-4a24-a17a-9bdfa7cb63dc" --columnTitle "ColumnTitle" --isEnabled false
88+
```
89+
90+
Reenable the autofill column for a selected column in a document library, based on the list id and column title.
91+
92+
```sh
93+
m365 spp autofillcolumn set --siteUrl "https://contoso.sharepoint.com/sites/mainSite" --listId "7645e69d-21fb-4a24-a17a-9bdfa7cb63dc" --columnTitle "ColumnTitle" --isEnabled true
94+
```
95+
96+
Modifies the prompt for the autofill column
97+
98+
```sh
99+
m365 spp autofillcolumn set --siteUrl "https://contoso.sharepoint.com/sites/mainSite" --listId "7645e69d-21fb-4a24-a17a-9bdfa7cb63dc" --columnTitle "ColumnTitle" --isEnabled true --prompt "Write a 1-line summary of the document"
100+
```
101+
102+
## Response
103+
104+
The command won't return a response on success.

docs/src/config/sidebars.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4231,6 +4231,15 @@ const sidebars: SidebarsConfig = {
42314231
},
42324232
{
42334233
'SharePoint Premium (spp)': [
4234+
{
4235+
autofillcolumn: [
4236+
{
4237+
type: 'doc',
4238+
label: 'autofillcolumn set',
4239+
id: 'cmd/spp/autofillcolumn/autofillcolumn-set'
4240+
}
4241+
]
4242+
},
42344243
{
42354244
contentcenter: [
42364245
{

eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const dictionary = [
2323
'assets',
2424
'assignment',
2525
'audit',
26+
'autofill',
2627
'azure',
2728
'bin',
2829
'builder',

src/m365/spp/commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const prefix: string = 'spp';
22

33
export default {
4+
AUTOFILLCOLUMN_SET: `${prefix} autofillcolumn set`,
45
CONTENTCENTER_LIST: `${prefix} contentcenter list`,
56
MODEL_APPLY: `${prefix} model apply`,
67
MODEL_GET: `${prefix} model get`,

0 commit comments

Comments
 (0)