sp-dev-site-scripts icon indicating copy to clipboard operation
sp-dev-site-scripts copied to clipboard

Subaction addFolder

Open gselvag opened this issue 4 years ago • 5 comments

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

Category

  • [x] Question
  • [ ] Bug
  • [ ] Enhancement

Expected or Desired Behavior

Add specified Folder(s) under document library.

Thanks for your contribution! Sharing is caring.

gselvag avatar Mar 31 '21 18:03 gselvag

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?

ricipi avatar Jul 14 '21 16:07 ricipi

Agreed. This does not work

Paul-Colucci avatar Oct 02 '23 20:10 Paul-Colucci

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.)

sympmarc avatar Oct 02 '23 20:10 sympmarc

{ "$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.

Paul-Colucci avatar Oct 03 '23 17:10 Paul-Colucci