SiteScripts/SubsitesList.json

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json",
  "actions": [
    {
      "verb": "createSPList",
      "listName": "Subsites List",
      "templateType": 100,
      "color": "4",
      "icon": "7",
      "subactions": [
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{fa564e0f-0c70-4ab9-b863-0177e6ddd247}\" Type=\"Text\" Name=\"Title\" DisplayName=\"Title\" Required=\"TRUE\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"Title\" FromBaseType=\"TRUE\" EnforceUniqueValues=\"FALSE\" Hidden=\"FALSE\" ReadOnly=\"FALSE\" CanToggleHidden=\"FALSE\" MaxLength=\"255\" Sealed=\"FALSE\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field Type=\"Text\" DisplayName=\"URL\" EnforceUniqueValues=\"FALSE\" Required=\"FALSE\" Hidden=\"FALSE\" ReadOnly=\"FALSE\" CanToggleHidden=\"FALSE\" ID=\"{1479bc48-c911-4828-a748-ef24c189c04c}\" Name=\"URL\" StaticName=\"URL\" MaxLength=\"255\" PITarget=\"\" PrimaryPITarget=\"\" PIAttribute=\"\" PrimaryPIAttribute=\"\" Aggregation=\"\" Node=\"\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field Type=\"Note\" DisplayName=\"Plan\" EnforceUniqueValues=\"FALSE\" Required=\"FALSE\" Hidden=\"FALSE\" ReadOnly=\"FALSE\" CanToggleHidden=\"FALSE\" CustomFormatter=\"{&#xD;&#xA; &quot;$schema&quot;: &quot;https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json&quot;,&#xD;&#xA; &quot;elmType&quot;: &quot;div&quot;,&#xD;&#xA; &quot;txtContent&quot;: &quot;@currentField&quot;,&#xD;&#xA; &quot;attributes&quot;: {&#xD;&#xA; &quot;class&quot;: &quot;=if(indexOf(toLowerCase(@currentField),'delete') != -1, 'sp-field-severity--warning','')&quot;&#xD;&#xA; }&#xD;&#xA;}\" ID=\"{eec79256-6fc8-4c66-8652-08501b45186f}\" Name=\"Plan\" StaticName=\"Plan\" RichText=\"FALSE\" RichTextMode=\"Compatible\" IsolateStyles=\"FALSE\" AppendOnly=\"FALSE\" NumLines=\"6\" PITarget=\"\" PrimaryPITarget=\"\" PIAttribute=\"\" PrimaryPIAttribute=\"\" Aggregation=\"\" Node=\"\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field Type=\"Choice\" DisplayName=\"Status\" EnforceUniqueValues=\"FALSE\" Required=\"FALSE\" Hidden=\"FALSE\" ReadOnly=\"FALSE\" CanToggleHidden=\"FALSE\" CustomFormatter=\"{&quot;elmType&quot;:&quot;div&quot;,&quot;style&quot;:{&quot;flex-wrap&quot;:&quot;wrap&quot;,&quot;display&quot;:&quot;flex&quot;},&quot;children&quot;:[{&quot;elmType&quot;:&quot;div&quot;,&quot;style&quot;:{&quot;box-sizing&quot;:&quot;border-box&quot;,&quot;padding&quot;:&quot;4px 8px 5px 8px&quot;,&quot;display&quot;:&quot;flex&quot;,&quot;border-radius&quot;:&quot;16px&quot;,&quot;height&quot;:&quot;24px&quot;,&quot;align-items&quot;:&quot;center&quot;,&quot;white-space&quot;:&quot;nowrap&quot;,&quot;overflow&quot;:&quot;hidden&quot;,&quot;margin&quot;:&quot;4px 4px 4px 4px&quot;},&quot;attributes&quot;:{&quot;class&quot;:{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Review Plan&quot;]},&quot;sp-css-backgroundColor-blueBackground37&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Plan Approved&quot;]},&quot;sp-css-backgroundColor-successBackground50&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Completed&quot;]},&quot;sp-css-backgroundColor-warningBackground50&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Holding&quot;]},&quot;sp-css-backgroundColor-blockingBackground50&quot;,&quot;sp-field-borderAllRegular sp-field-borderAllSolid sp-css-borderColor-neutralSecondary&quot;]}]}]}]}]}},&quot;children&quot;:[{&quot;elmType&quot;:&quot;span&quot;,&quot;style&quot;:{&quot;line-height&quot;:&quot;16px&quot;,&quot;height&quot;:&quot;14px&quot;},&quot;attributes&quot;:{&quot;iconName&quot;:{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Review Plan&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Plan Approved&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Completed&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Holding&quot;]},&quot;&quot;,&quot;&quot;]}]}]}]}]}}},{&quot;elmType&quot;:&quot;span&quot;,&quot;style&quot;:{&quot;overflow&quot;:&quot;hidden&quot;,&quot;text-overflow&quot;:&quot;ellipsis&quot;,&quot;padding&quot;:&quot;0 3px&quot;},&quot;txtContent&quot;:&quot;@currentField&quot;,&quot;attributes&quot;:{&quot;class&quot;:{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Review Plan&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Plan Approved&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Completed&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;&quot;]},&quot;&quot;,{&quot;operator&quot;:&quot;:&quot;,&quot;operands&quot;:[{&quot;operator&quot;:&quot;==&quot;,&quot;operands&quot;:[&quot;@currentField&quot;,&quot;Holding&quot;]},&quot;&quot;,&quot;&quot;]}]}]}]}]}}}]}],&quot;templateId&quot;:&quot;BgColorChoicePill&quot;}\" ID=\"{ab702905-eb26-401b-a93f-5d71fa5d796d}\" Name=\"Status\" StaticName=\"Status\" Format=\"Dropdown\" FillInChoice=\"FALSE\" PITarget=\"\" PrimaryPITarget=\"\" PIAttribute=\"\" PrimaryPIAttribute=\"\" Aggregation=\"\" Node=\"\"><Default>Review Plan</Default><CHOICES><CHOICE>Review Plan</CHOICE><CHOICE>Plan Approved</CHOICE><CHOICE>Completed</CHOICE><CHOICE>Holding</CHOICE></CHOICES></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field Type=\"Text\" DisplayName=\"Hub Name\" EnforceUniqueValues=\"FALSE\" Required=\"FALSE\" Hidden=\"FALSE\" ReadOnly=\"FALSE\" CanToggleHidden=\"FALSE\" ID=\"{469ab0d4-1e36-4563-bfa3-32867d127031}\" Name=\"HubName\" StaticName=\"HubName\" MaxLength=\"255\" PITarget=\"\" PrimaryPITarget=\"\" PIAttribute=\"\" PrimaryPIAttribute=\"\" Aggregation=\"\" Node=\"\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field Type=\"DateTime\" DisplayName=\"Date to move\" EnforceUniqueValues=\"FALSE\" Required=\"FALSE\" Hidden=\"FALSE\" ReadOnly=\"FALSE\" CanToggleHidden=\"FALSE\" ID=\"{9ccfee9d-86fa-4d62-b6cc-0b429d091a1b}\" Name=\"Datetomove\" StaticName=\"Datetomove\" Format=\"DateOnly\" FriendlyDisplayFormat=\"Disabled\" PITarget=\"\" PrimaryPITarget=\"\" PIAttribute=\"\" PrimaryPIAttribute=\"\" Aggregation=\"\" Node=\"\" />"
        },
        {
          "verb": "addSPView",
          "name": "All Items",
          "viewFields": [
            "Edit",
            "LinkTitleNoMenu",
            "URL",
            "Status",
            "Plan",
            "HubName",
            "Datetomove"
          ],
          "query": "<OrderBy><FieldRef Name=\"Title\" /></OrderBy>",
          "rowLimit": 30,
          "isPaged": true,
          "makeDefault": true,
          "formatterJSON": "",
          "replaceViewFields": true
        },
        {
          "verb": "addSPView",
          "name": "Datasheet",
          "viewFields": [
            "Edit",
            "LinkTitleNoMenu",
            "URL",
            "Status",
            "Plan",
            "HubName"
          ],
          "query": "",
          "rowLimit": 100,
          "isPaged": true,
          "replaceViewFields": true
        }
      ]
    }
  ]
}