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

New command: m365 spp autofillcolumn set #6203

Open
Tracked by #6074
mkm17 opened this issue Jul 30, 2024 · 14 comments · May be fixed by #6460
Open
Tracked by #6074

New command: m365 spp autofillcolumn set #6203

mkm17 opened this issue Jul 30, 2024 · 14 comments · May be fixed by #6460

Comments

@mkm17
Copy link
Contributor

mkm17 commented Jul 30, 2024

Usage

m365 spp autofillcolumn set [options]

Description

Applies the autofill option to the selected column.

Options

Option Description
-u, --siteUrl <siteUrl> The URL of the target site.
--listTitle [listTitle] The title of the library on which to apply the model. Specify either listTitle, listId, or listUrl but not multiple.
--listId [listId] The ID of the library on which to apply the model. Specify either listTitle, listId, or listUrl but not multiple.
--listUrl [listUrl] Server or web-relative URL of the library on which to apply the model. Specify either listTitle, listId, or listUrl but not multiple.
-c, --column <column> ID of the column to which the autofill option will be assigned.
--prompt [prompt] The text in natural language that will be used to extract specific information or generate information from files within a SharePoint library.
--isEnabled [--isEnabled] Enables or disables the autofill column feature.

Examples

Applies an autofill column on a selected column to a document library based on the list id.

m365 spp autofillcolumn set --siteUrl "https://contoso.sharepoint.com/sites/ContentCenter" --listId "7645e69d-21fb-4a24-a17a-9bdfa7cb63dc" --columnId "1045e69d-21fb-4214-a25a-9bdfa7cb63a2" --prompt "Write a 2-line summary of the document"

Applies an autofill column on a selected column to a document library based on the list title.

m365 spp autofillcolumn set --siteUrl "https://contoso.sharepoint.com/sites/ContentCenter" --listTitle "Documents" --column "1045e69d-21fb-4214-a25a-9bdfa7cb63a2" --prompt "Write a 2-line summary of the document"

Applies an autofill column on a selected column to a document library based on the list URL.

m365 spp autofillcolumn set --siteUrl "https://contoso.sharepoint.com/sites/ContentCenter" --listUrl '/Shared Documents' --column "1045e69d-21fb-4214-a25a-9bdfa7cb63a2" --prompt "Write a 2-line summary of the document"

Disables the autofill column on a selected column in a document library based on the list URL.

m365 spp autofillcolumn set --siteUrl "https://contoso.sharepoint.com/sites/ContentCenter" --listUrl '/Shared Documents' --column "1045e69d-21fb-4214-a25a-9bdfa7cb63a2" --isEnabled false

Additional Info

This endpoint should be used -> _api/machinelearning/SetSyntexPoweredColumnPrompts

with body:

{
  "docLibId": "{8a6027ab-c584-4394-ba9c-3dc4dd152b65}",
  "syntexPoweredColumnPrompts": "[{\"columnId\":\"13c5ebaa-a843-468f-9706-660cd3fc9011\",\"columnName\":\"Education\",\"prompt\":\" Prompt\".\",\"isEnabled\":true}]"
}

link
Currently, autofill columns are available for the following column data types:

  • Text
  • Multiple lines of text
  • Number
  • Yes/No
  • Date and time
  • Choice
  • Hyperlink
  • Currency
@milanholemans milanholemans added needs peer review Needs second pair of eyes to review the spec or PR feature request labels Jul 30, 2024
@milanholemans milanholemans changed the title New command: m365 spp autofillcolumn add New command: m365 spp autofillcolumn set Jul 30, 2024
@Jwaegebaert
Copy link
Contributor

Thanks for speccing this out @mkm17. I've a few comments:

  • It would be nice to have a bit more descriptive description for the last three options.
  • isEnabled why do we have this option? Can we disable it as well?

@mkm17 mkm17 changed the title New command: m365 spp autofillcolumn set New command: m365 spp autofillcolumn apply Aug 4, 2024
@mkm17
Copy link
Contributor Author

mkm17 commented Aug 4, 2024

Hi @Jwaegebaert, Thank you very much for the comments. You are right; maybe we can remove the isEnabled option, as we can assume that someone would like to enable this option when they apply it to the column. For this reason, I have changed the name of this command from "set" to "apply."

The isEnabled option and prompt can be added to the "set" command to update the properties of autofill for the column.

@Jwaegebaert
Copy link
Contributor

Good approach @mkm17! apply seems like a better way for this command. I've no further comments, so we should be able to move forward. Do you want to take it from here, or should we open it up?

@mkm17
Copy link
Contributor Author

mkm17 commented Aug 9, 2024

@Jwaegebaert Yes you can assign me to this one as well

@Jwaegebaert Jwaegebaert added work in progress and removed needs peer review Needs second pair of eyes to review the spec or PR labels Aug 13, 2024
@Jwaegebaert
Copy link
Contributor

All yours @mkm17!

@Jwaegebaert
Copy link
Contributor

Hey @mkm17, thank you for all the hard work you’ve put in, it’s really appreciated! We’ve noticed that you have several issues assigned that haven't yet been created with a PR. To ensure everyone has a chance to get involved, especially with Hacktoberfest, I’ll be unassigning you from some of these issues.

We recommend focusing on 1 to 2 issues at a time. Once you’ve submitted a PR for an issue, you can easily claim another open one. This approach helps you manage the workload more effectively and ensures you can give each task the attention it needs.

Thanks again for your continued contributions!

@Jwaegebaert Jwaegebaert added help wanted hacktoberfest Issue perfect for hacktoberfest and removed work in progress labels Sep 26, 2024
@mkm17
Copy link
Contributor Author

mkm17 commented Oct 6, 2024

Hi @Jwaegebaert, I have submitted two pull requests for my last open issues, so I am ready to take on the next two. Can I take this back?

mkm17 added a commit to mkm17/cli-microsoft365 that referenced this issue Nov 1, 2024
mkm17 added a commit to mkm17/cli-microsoft365 that referenced this issue Nov 1, 2024
@mkm17 mkm17 linked a pull request Nov 1, 2024 that will close this issue
mkm17 added a commit to mkm17/cli-microsoft365 that referenced this issue Nov 1, 2024
@Adam-it Adam-it removed the hacktoberfest Issue perfect for hacktoberfest label Nov 3, 2024
@martinlingstuyl
Copy link
Contributor

I'm a bit late to the party here, but are we sure that using apply is better than using set?
We try to stick to the same verbs across the codebase, only deviating from them if there's a really good reason.
I'm doubting whether that's the case here.

Aside from that: apply seems to me rather vague.

And on an earlier discussion: if we can enable/disable autofill on a column we should definitely expose that I think. So including --isEnabled as an option would make sense in my eyes.

Any comments from you guys? @mkm17, @pnp/cli-for-microsoft-365-maintainers?

@mkm17
Copy link
Contributor Author

mkm17 commented Jan 16, 2025

Hi @martinlingstuyl, what do you think about renaming this command to add and adding a new one spp autofillcolumn set ? Or even extending the existing spo field set command with the option autofillColumn ['Enabled', 'Disabled']?

@martinlingstuyl
Copy link
Contributor

I'd personally vote for using m365 spp autofillcolumn set. And also to include --enabled here as that makes sense from sp premium point of view. We're not really adding anything, but updating something existing. And as this autofill behavior can be disabled set would make more sense as well from that reason. --prompt should however be made optional, because when disabling using --enabled false it would not be logical to add the prompt.

Any feedback @pnp/cli-for-microsoft-365-maintainers? @Jwaegebaert ?

@milanholemans
Copy link
Contributor

I'm not super experienced with using Syntex columns, but what @martinlingstuyl says, makes sense to me.

@Adam-it
Copy link
Member

Adam-it commented Jan 19, 2025

I would also stick with @martinlingstuyl suggestion but I have very little experience with SharePoint Premium features as it is more admin oriented part of SP and I didn't have any side/dev project that needed to do anything with that part of SharePoint

@mkm17
Copy link
Contributor Author

mkm17 commented Jan 19, 2025

@martinlingstuyl , ok will make the changes accordingly in the existing #6460 PR. :) Thanks for suggestion.

@martinlingstuyl
Copy link
Contributor

@mkm17, if the prompt is empty and enabled is true it should maybe only throw an error if a prompt has not already been configured.

In such a scenario you could call GetSyntexPoweredColumnPrompts to see if the column has already been configured and is just in a disabled state. What do you think?

@mkm17 mkm17 changed the title New command: m365 spp autofillcolumn apply New command: m365 spp autofillcolumn set Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants