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

Invoke-PnPSiteScript does not add List Columns to existing list #1072

Open
jh-sigmadx opened this issue Oct 16, 2024 · 0 comments
Open

Invoke-PnPSiteScript does not add List Columns to existing list #1072

jh-sigmadx opened this issue Oct 16, 2024 · 0 comments

Comments

@jh-sigmadx
Copy link

jh-sigmadx commented Oct 16, 2024

I provisioned a Site and Lists from a Site Script.

I then amended the Site Script to add another field to one of the lists.

I then ran the Invoke-PnPSiteScript again, expecting the new column to be created.

It was not.

The documentation here:
https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview

Clearly states:
"Site scripts can be run again on the same site after provisioning. Site scripts are non-destructive, so when they run again, they ensure that the site matches the configuration in the script.

For example, if the site already has a list with the same name that the site script is creating, the site script will only add missing fields to the existing list."

The Create List Step outputted:
ErrorCode : 0
Outcome : 0
OutcomeText :
Target : ########## (redacted)
TargetId : 92509bd0-1a58-4e7f-b20c-3af7e3ab6abe
Title : Create or update list "Contacts"

  • I notice that the step is specifically named "Create or Update list..."

The Output of the SiteScript Step for adding the additional field looks like this:

ErrorCode : 0
Outcome : 0
OutcomeText :
Target :
TargetId :
Title : Add list column "TESTAddColumn"

Notice that NO error was given, but also that the "Outcome" = 0.
Again, The Column was NOT created in the list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant