pnp / sp-dev-site-scripts

Repository for sample SharePoint site designs and site scripts
https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview
MIT License
162 stars 68 forks source link

Subaction addFolder #51

Open gselvag opened 3 years ago

gselvag commented 3 years ago

According to schema the subaction addFolder is added. But it doesn't work as expected. Is there any possible update on this issue.

Category

Expected or Desired Behavior

Add specified Folder(s) under document library.

Thanks for your contribution! Sharing is caring.

ricipi commented 3 years ago

The subAction "addFolder" is still not working but it's included in the schema: https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json. Any news about the issue?

Paul-Colucci commented 1 year ago

Agreed. This does not work

sympmarc commented 1 year ago

I've used this many times and it has worked for me. What issues have you been having? (The initial issue is 2y old, so likely no longer the actual issue.)

Paul-Colucci commented 1 year ago

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json", "actions": [ { "verb": "createSPList", "listName": "Test List", "templateType": 101, "subactions": [ { "verb": "setDescription", "description": "This is the description" }, { "verb": "addFolder", "path": "TestFolder", } ], "version": 1 }

the above schema adds a list called "Test List" with no description or subfolders.

oddly enough the following will set the description:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json", "actions": [ { "verb": "createSPList", "listName": "Test List", "templateType": 101, "description": "this is the description", "subactions": [ { "verb": "addFolder", "path": "TestFolder", } ], "version": 1 }

there is no way I can a site script to actually make sub folders.