SOLVED

Apply site script to existing site?

Copper Contributor

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

1 Reply
best response confirmed by James Marley (Copper Contributor)
Solution

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.

1 best response

Accepted Solutions
best response confirmed by James Marley (Copper Contributor)
Solution

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.

View solution in original post