Forum Discussion

James Marley's avatar
James Marley
Copper Contributor
Sep 24, 2018
Solved

Apply site script to existing site?

Hi,

 

I feel I am being really stupid. I have a JSON script that adds a new Document library and various fields and joins a hubsite. However I want to add a field to an existing list during site creation.

Various commands in the schema (https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-json-schema) say that you can add them to existing lists. I have created a site list but how do I reference the existing list to add it?

 

Hopefully that makes sense

  • It turns out that you just use the createlist command and if it already exists it updates it. It would be nice if they told you int he documentation.

  • James Marley's avatar
    James Marley
    Copper Contributor

    It turns out that you just use the createlist command and if it already exists it updates it. It would be nice if they told you int he documentation.

Resources