0

I'm trying to create list/library template using Site Script API in SharePoint Online through power automate.

Below is the site script JSON of library and associated lookup list

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json",
  "actions": [
    {
      "verb": "createSPList",
      "listName": "Creditors",
      "templateType": 120,
      "subactions": [
        {
          "verb": "setDescription",
          "description": "List of WDC Creditors to provide a lookup for the invoice processing creditor value"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field Type=\"Text\" Calculated=\"FALSE\" ID=\"{fa564e0f-0c70-4ab9-b863-0177e6ddd247}\" Name=\"Title\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"Title\" FromBaseType=\"TRUE\" DisplayName=\"Creditors\" Required=\"FALSE\" Sealed=\"FALSE\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{bc91a437-52e7-49e1-8c4e-4698904b2b6d}\" ReadOnly=\"TRUE\" Type=\"Computed\" Name=\"LinkTitleNoMenu\" DisplayName=\"Creditors\" Dir=\"\" DisplayNameSrcField=\"Title\" AuthoringInfo=\"(linked to item)\" EnableLookup=\"TRUE\" ListItemMenuAllowed=\"Prohibited\" LinkToItemAllowed=\"Prohibited\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"LinkTitleNoMenu\" FromBaseType=\"TRUE\"><FieldRefs><FieldRef Name=\"Title\" /><FieldRef Name=\"LinkFilenameNoMenu\" /></FieldRefs><DisplayPattern><IfEqual><Expr1><LookupColumn Name=\"FSObjType\" /></Expr1><Expr2>1</Expr2><Then><Field Name=\"LinkFilenameNoMenu\" /></Then><Else><HTML><![CDATA[<a onfocus=\"OnLink(this)\" href=\"]]></HTML><URL /><HTML><![CDATA[\" onclick=\"EditLink2(this,]]></HTML><Counter Type=\"View\" /><HTML><![CDATA[);return false;\" target=\"_self\">]]></HTML><Column HTMLEncode=\"TRUE\" Name=\"Title\" Default=\"(no title)\" /><IfEqual><Expr1><GetVar Name=\"ShowAccessibleIcon\" /></Expr1><Expr2>1</Expr2><Then><HTML><![CDATA[<img src=\"/_layouts/15/images/blank.gif?rev=47\" class=\"ms-hidden\" border=\"0\" width=\"1\" height=\"1\" alt=\"Use SHIFT+ENTER to open the menu (new window).\"/>]]></HTML></Then></IfEqual><HTML><![CDATA[</a>]]></HTML><IfNew><HTML><![CDATA[<img src=\"/_layouts/1033/images/new.gif\" alt=\"]]></HTML><HTML>New</HTML><HTML><![CDATA[\" class=\"ms-newgif\" />]]></HTML></IfNew></Else></IfEqual></DisplayPattern></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{82642ec8-ef9b-478f-acf9-31f7d45fbc31}\" ReadOnly=\"TRUE\" Type=\"Computed\" Name=\"LinkTitle\" DisplayName=\"Creditors\" DisplayNameSrcField=\"Title\" ClassInfo=\"Menu\" AuthoringInfo=\"(linked to item with edit menu)\" ListItemMenuAllowed=\"Required\" LinkToItemAllowed=\"Prohibited\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"LinkTitle\" FromBaseType=\"TRUE\"><FieldRefs><FieldRef Name=\"Title\" /><FieldRef Name=\"LinkTitleNoMenu\" /><FieldRef Name=\"_EditMenuTableStart2\" /><FieldRef Name=\"_EditMenuTableEnd\" /></FieldRefs><DisplayPattern><FieldSwitch><Expr><GetVar Name=\"FreeForm\" /></Expr><Case Value=\"TRUE\"><Field Name=\"LinkTitleNoMenu\" /></Case><Default><HTML><![CDATA[<div class=\"ms-vb itx\" onmouseover=\"OnItem(this)\" CTXName=\"ctx]]></HTML><Field Name=\"_EditMenuTableStart2\" /><HTML><![CDATA[\">]]></HTML><Field Name=\"LinkTitleNoMenu\" /><HTML><![CDATA[</div>]]></HTML><HTML><![CDATA[<div class=\"s4-ctx\" onmouseover=\"OnChildItem(this.parentNode); return false;\">]]></HTML><HTML><![CDATA[<span>&nbsp;</span>]]></HTML><HTML><![CDATA[<a onfocus=\"OnChildItem(this.parentNode.parentNode); return false;\" onclick=\"PopMenuFromChevron(event); return false;\" href=\"javascript:;\" title=\"Open Menu\"></a>]]></HTML><HTML><![CDATA[<span>&nbsp;</span>]]></HTML><HTML><![CDATA[</div>]]></HTML></Default></FieldSwitch></DisplayPattern></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{5f190d91-3dbc-4489-9878-3c092caf35b6}\" Hidden=\"TRUE\" ReadOnly=\"TRUE\" Type=\"Computed\" Name=\"LinkTitle2\" DisplayName=\"Creditors\" DisplayNameSrcField=\"Title\" ClassInfo=\"Menu\" AuthoringInfo=\"(linked to item with edit menu) (old)\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"LinkTitle2\" FromBaseType=\"TRUE\"><FieldRefs><FieldRef Name=\"Title\" /><FieldRef Name=\"LinkTitleNoMenu\" /><FieldRef Name=\"_EditMenuTableStart\" /><FieldRef Name=\"_EditMenuTableEnd\" /></FieldRefs><DisplayPattern><FieldSwitch><Expr><GetVar Name=\"FreeForm\" /></Expr><Case Value=\"TRUE\"><Field Name=\"LinkTitleNoMenu\" /></Case><Default><Field Name=\"_EditMenuTableStart\" /><SetVar Name=\"ShowAccessibleIcon\" Value=\"1\" /><Field Name=\"LinkTitleNoMenu\" /><SetVar Name=\"ShowAccessibleIcon\" Value=\"0\" /><Field Name=\"_EditMenuTableEnd\" /></Default></FieldSwitch></DisplayPattern></Field>"
        },
        {
          "verb": "addSPView",
          "name": "All Items",
          "viewFields": [
            "DocIcon",
            "LinkTitle"
          ],
          "query": "",
          "rowLimit": 30,
          "isPaged": true,
          "makeDefault": true,
          "replaceViewFields": true
        }
      ]
    },
    {
      "verb": "createSPList",
      "listName": "Invoices",
      "templateType": 101,
      "subactions": [
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field DisplayName=\"Status\" FillInChoice=\"FALSE\" Format=\"Dropdown\" Name=\"Status\" Title=\"Status\" Type=\"Choice\" ID=\"{0249878c-5cb7-4842-a789-9c1f5699de86}\" StaticName=\"Status\" CustomFormatter=\"\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" Indexed=\"FALSE\"><CHOICES><CHOICE>Uncoded</CHOICE><CHOICE>Coded</CHOICE><CHOICE>Authority</CHOICE></CHOICES><Default>Uncoded</Default></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field Type=\"Text\" DisplayName=\"Sign-off status\" Title=\"Sign-off status\" StaticName=\"_Flow_SignoffStatus\" ID=\"{e339dcf0-7a06-4cae-8a3a-54a760d3ad3f}\" Name=\"Sign_x002d_off_x0020_status\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field Type=\"Choice\" DisplayName=\"InvType\" Description=\"Please select the Invoice Type\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" Indexed=\"TRUE\" Format=\"RadioButtons\" FillInChoice=\"FALSE\" ID=\"{4cb775ab-a82f-47fd-9df1-ee922781a8f1}\" StaticName=\"InvType\" Name=\"InvType\" CustomFormatter=\"\"><Default>Invoice</Default><CHOICES><CHOICE>Invoice</CHOICE><CHOICE>Credit Note</CHOICE><CHOICE>Reimbursement</CHOICE><CHOICE>Credit Card Payment</CHOICE><CHOICE>Refund</CHOICE></CHOICES><Validation Message=\"Please complete Invoice Type\" /></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field DisplayName=\"Signatory\" Format=\"Dropdown\" List=\"UserInfo\" Name=\"Signatory\" Required=\"TRUE\" Title=\"Signatory\" Type=\"User\" UserSelectionMode=\"0\" UserSelectionScope=\"0\" ID=\"{562a2e0a-6438-4187-b155-c640ebea94e4}\" StaticName=\"Signatory\" ShowInFiltersPane=\"Pinned\" Indexed=\"FALSE\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field DisplayName=\"Signatory 2\" Format=\"Dropdown\" List=\"UserInfo\" Name=\"Signatory2\" Title=\"Signatory 2\" Type=\"User\" UserSelectionMode=\"PeopleOnly\" UserSelectionScope=\"0\" ID=\"{ca96c897-711a-4090-ba5a-e742b43ec6eb}\" StaticName=\"Signatory2\" ShowInFiltersPane=\"Pinned\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" Group=\"\" ShowField=\"ImnName\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field DisplayName=\"Signed By Signatory\" Format=\"Dropdown\" Name=\"SignedBySignatory\" Title=\"Signed By Signatory\" Type=\"Boolean\" ID=\"{1ae7ffdf-52b8-4feb-b7b2-efbedbd1f449}\" StaticName=\"SignedBySignatory\" ShowInFiltersPane=\"Pinned\" Indexed=\"TRUE\" CustomFormatter=\"{  &#xD;&#xA;  &quot;elmType&quot;: &quot;div&quot;,  &#xD;&#xA;  &quot;style&quot;: {  &#xD;&#xA;    &quot;padding&quot;: &quot;0 4px&quot;,  &#xD;&#xA;    &quot;color&quot;: &quot;black&quot;,  &#xD;&#xA;    &quot;background-color&quot;: {  &#xD;&#xA;        &quot;operator&quot;: &quot;:&quot;,  &#xD;&#xA;      &quot;operands&quot;: [  &#xD;&#xA;        {  &#xD;&#xA;          &quot;operator&quot;: &quot;==&quot;,  &#xD;&#xA;          &quot;operands&quot;: [  &#xD;&#xA;            &quot;@currentField&quot;,  &#xD;&#xA;            true  &#xD;&#xA;          ]  &#xD;&#xA;        },  &#xD;&#xA;        &quot;White&quot;,  &#xD;&#xA;        {  &#xD;&#xA;          &quot;operator&quot;: &quot;:&quot;,  &#xD;&#xA;          &quot;operands&quot;: [  &#xD;&#xA;            {  &#xD;&#xA;              &quot;operator&quot;: &quot;==&quot;,  &#xD;&#xA;              &quot;operands&quot;: [  &#xD;&#xA;                &quot;@currentField&quot;,  &#xD;&#xA;                false  &#xD;&#xA;              ]  &#xD;&#xA;            },  &#xD;&#xA;            &quot;White&quot;,  &#xD;&#xA;            &quot;&quot;  &#xD;&#xA;          ]  &#xD;&#xA;        }  &#xD;&#xA;      ]  &#xD;&#xA;    }  &#xD;&#xA;  },  &#xD;&#xA;  &quot;attributes&quot;: {  &#xD;&#xA;  },  &#xD;&#xA;  &quot;txtContent&quot;: &quot;=if(@currentField==true,'Yes',if(@currentField==false,'No',''))&quot;  &#xD;&#xA;}\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\"><Default>0</Default></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field DisplayName=\"Signed By Signatory 2\" Format=\"Dropdown\" Name=\"SignedBySignatory2\" Title=\"Signed By Signatory 2\" Type=\"Boolean\" ID=\"{868cf9e7-a27d-41b9-954e-25288a928512}\" StaticName=\"SignedBySignatory2\" ShowInFiltersPane=\"Pinned\" Indexed=\"TRUE\" CustomFormatter=\"{  &#xD;&#xA;  &quot;elmType&quot;: &quot;div&quot;,  &#xD;&#xA;  &quot;style&quot;: {  &#xD;&#xA;    &quot;padding&quot;: &quot;0 4px&quot;,  &#xD;&#xA;    &quot;color&quot;: &quot;black&quot;,  &#xD;&#xA;    &quot;background-color&quot;: {  &#xD;&#xA;        &quot;operator&quot;: &quot;:&quot;,  &#xD;&#xA;      &quot;operands&quot;: [  &#xD;&#xA;        {  &#xD;&#xA;          &quot;operator&quot;: &quot;==&quot;,  &#xD;&#xA;          &quot;operands&quot;: [  &#xD;&#xA;            &quot;@currentField&quot;,  &#xD;&#xA;            true  &#xD;&#xA;          ]  &#xD;&#xA;        },  &#xD;&#xA;        &quot;White&quot;,  &#xD;&#xA;        {  &#xD;&#xA;          &quot;operator&quot;: &quot;:&quot;,  &#xD;&#xA;          &quot;operands&quot;: [  &#xD;&#xA;            {  &#xD;&#xA;              &quot;operator&quot;: &quot;==&quot;,  &#xD;&#xA;              &quot;operands&quot;: [  &#xD;&#xA;                &quot;@currentField&quot;,  &#xD;&#xA;                false  &#xD;&#xA;              ]  &#xD;&#xA;            },  &#xD;&#xA;            &quot;White&quot;,  &#xD;&#xA;            &quot;&quot;  &#xD;&#xA;          ]  &#xD;&#xA;        }  &#xD;&#xA;      ]  &#xD;&#xA;    }  &#xD;&#xA;  },  &#xD;&#xA;  &quot;attributes&quot;: {  &#xD;&#xA;  },  &#xD;&#xA;  &quot;txtContent&quot;: &quot;=if(@currentField==true,'Yes',if(@currentField==false,'No',''))&quot;  &#xD;&#xA;}\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\"><Default>0</Default></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ClientSideComponentId=\"00000000-0000-0000-0000-000000000000\" Description=\"Code\" DisplayName=\"Code\" Format=\"Dropdown\" MaxLength=\"255\" Name=\"Code\" Title=\"Code\" Type=\"Text\" ID=\"{799d58dc-f58f-4414-bdcb-880ea7154c94}\" StaticName=\"Code\" Indexed=\"TRUE\" AutoIndexed=\"TRUE\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field DisplayName=\"PO Number\" Format=\"Dropdown\" MaxLength=\"255\" Name=\"PONumber\" Title=\"PO Number\" Type=\"Text\" ID=\"{cb67b2ad-a8d5-445a-a144-305afef7539a}\" StaticName=\"PONumber\" Indexed=\"TRUE\" AutoIndexed=\"TRUE\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field DisplayName=\"Entered into Authority\" FriendlyDisplayFormat=\"Disabled\" Format=\"DateOnly\" Name=\"EnteredintoAuthority\" Title=\"Entered into Authority\" Type=\"DateTime\" ID=\"{b33f0f20-8f5d-4a62-8bd0-02bc966dcfb2}\" StaticName=\"EnteredintoAuthority\" Description=\"FINANCE ONLY - date entered into authority\" CustomFormatter=\"\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" Indexed=\"TRUE\" CalType=\"0\" ShowInFiltersPane=\"Removed\" AutoIndexed=\"TRUE\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field DisplayName=\"Withdrawn\" Format=\"Dropdown\" Name=\"Withdrawn\" Title=\"Withdrawn\" Type=\"Boolean\" ID=\"{ca99a5da-7b41-4ce6-a6a7-6587b90171a5}\" StaticName=\"Withdrawn\" Description=\"Contact Finance if the you need to withdraw the invoice\" CustomFormatter=\"{  &#xD;&#xA;  &quot;elmType&quot;: &quot;div&quot;,  &#xD;&#xA;  &quot;style&quot;: {  &#xD;&#xA;    &quot;padding&quot;: &quot;0 4px&quot;,  &#xD;&#xA;    &quot;color&quot;: &quot;black&quot;,  &#xD;&#xA;    &quot;background-color&quot;: {  &#xD;&#xA;        &quot;operator&quot;: &quot;:&quot;,  &#xD;&#xA;      &quot;operands&quot;: [  &#xD;&#xA;        {  &#xD;&#xA;          &quot;operator&quot;: &quot;==&quot;,  &#xD;&#xA;          &quot;operands&quot;: [  &#xD;&#xA;            &quot;@currentField&quot;,  &#xD;&#xA;            true  &#xD;&#xA;          ]  &#xD;&#xA;        },  &#xD;&#xA;        &quot;White&quot;,  &#xD;&#xA;        {  &#xD;&#xA;          &quot;operator&quot;: &quot;:&quot;,  &#xD;&#xA;          &quot;operands&quot;: [  &#xD;&#xA;            {  &#xD;&#xA;              &quot;operator&quot;: &quot;==&quot;,  &#xD;&#xA;              &quot;operands&quot;: [  &#xD;&#xA;                &quot;@currentField&quot;,  &#xD;&#xA;                false  &#xD;&#xA;              ]  &#xD;&#xA;            },  &#xD;&#xA;            &quot;White&quot;,  &#xD;&#xA;            &quot;&quot;  &#xD;&#xA;          ]  &#xD;&#xA;        }  &#xD;&#xA;      ]  &#xD;&#xA;    }  &#xD;&#xA;  },  &#xD;&#xA;  &quot;attributes&quot;: {  &#xD;&#xA;  },  &#xD;&#xA;  &quot;txtContent&quot;: &quot;=if(@currentField==true,'Yes',if(@currentField==false,'No',''))&quot;  &#xD;&#xA;}\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" Indexed=\"TRUE\"><Default>0</Default></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field DisplayName=\"On Hold\" Format=\"Dropdown\" Name=\"OnHold\" Title=\"On Hold\" Type=\"Boolean\" ID=\"{16f91a38-300f-4208-8c40-38f268db1085}\" StaticName=\"OnHold\" Indexed=\"FALSE\" CustomFormatter=\"{  &#xD;&#xA;  &quot;elmType&quot;: &quot;div&quot;,  &#xD;&#xA;  &quot;style&quot;: {  &#xD;&#xA;    &quot;padding&quot;: &quot;0 4px&quot;,  &#xD;&#xA;    &quot;color&quot;: &quot;black&quot;,  &#xD;&#xA;    &quot;background-color&quot;: {  &#xD;&#xA;        &quot;operator&quot;: &quot;:&quot;,  &#xD;&#xA;      &quot;operands&quot;: [  &#xD;&#xA;        {  &#xD;&#xA;          &quot;operator&quot;: &quot;==&quot;,  &#xD;&#xA;          &quot;operands&quot;: [  &#xD;&#xA;            &quot;@currentField&quot;,  &#xD;&#xA;            true  &#xD;&#xA;          ]  &#xD;&#xA;        },  &#xD;&#xA;        &quot;White&quot;,  &#xD;&#xA;        {  &#xD;&#xA;          &quot;operator&quot;: &quot;:&quot;,  &#xD;&#xA;          &quot;operands&quot;: [  &#xD;&#xA;            {  &#xD;&#xA;              &quot;operator&quot;: &quot;==&quot;,  &#xD;&#xA;              &quot;operands&quot;: [  &#xD;&#xA;                &quot;@currentField&quot;,  &#xD;&#xA;                false  &#xD;&#xA;              ]  &#xD;&#xA;            },  &#xD;&#xA;            &quot;White&quot;,  &#xD;&#xA;            &quot;&quot;  &#xD;&#xA;          ]  &#xD;&#xA;        }  &#xD;&#xA;      ]  &#xD;&#xA;    }  &#xD;&#xA;  },  &#xD;&#xA;  &quot;attributes&quot;: {  &#xD;&#xA;  },  &#xD;&#xA;  &quot;txtContent&quot;: &quot;=if(@currentField==true,'Yes',if(@currentField==false,'No',''))&quot;  &#xD;&#xA;}\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\"><Default>0</Default></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field DisplayName=\"Urgent Payment\" Format=\"Dropdown\" Name=\"UrgentPayment\" Title=\"Urgent Payment\" Type=\"Boolean\" ID=\"{d9793cff-d18e-451d-9af3-d02c050b7cf9}\" StaticName=\"UrgentPayment\" ShowInFiltersPane=\"Pinned\" Indexed=\"FALSE\" CustomFormatter=\"{  &#xD;&#xA;  &quot;elmType&quot;: &quot;div&quot;,  &#xD;&#xA;  &quot;style&quot;: {  &#xD;&#xA;    &quot;padding&quot;: &quot;0 4px&quot;,  &#xD;&#xA;    &quot;color&quot;: &quot;black&quot;,  &#xD;&#xA;    &quot;background-color&quot;: {  &#xD;&#xA;        &quot;operator&quot;: &quot;:&quot;,  &#xD;&#xA;      &quot;operands&quot;: [  &#xD;&#xA;        {  &#xD;&#xA;          &quot;operator&quot;: &quot;==&quot;,  &#xD;&#xA;          &quot;operands&quot;: [  &#xD;&#xA;            &quot;@currentField&quot;,  &#xD;&#xA;            true  &#xD;&#xA;          ]  &#xD;&#xA;        },  &#xD;&#xA;        &quot;White&quot;,  &#xD;&#xA;        {  &#xD;&#xA;          &quot;operator&quot;: &quot;:&quot;,  &#xD;&#xA;          &quot;operands&quot;: [  &#xD;&#xA;            {  &#xD;&#xA;              &quot;operator&quot;: &quot;==&quot;,  &#xD;&#xA;              &quot;operands&quot;: [  &#xD;&#xA;                &quot;@currentField&quot;,  &#xD;&#xA;                false  &#xD;&#xA;              ]  &#xD;&#xA;            },  &#xD;&#xA;            &quot;White&quot;,  &#xD;&#xA;            &quot;&quot;  &#xD;&#xA;          ]  &#xD;&#xA;        }  &#xD;&#xA;      ]  &#xD;&#xA;    }  &#xD;&#xA;  },  &#xD;&#xA;  &quot;attributes&quot;: {  &#xD;&#xA;  },  &#xD;&#xA;  &quot;txtContent&quot;: &quot;=if(@currentField==true,'Yes',if(@currentField==false,'No',''))&quot;  &#xD;&#xA;}\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\"><Default>0</Default></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field DisplayName=\"Creditor\" FillInChoice=\"TRUE\" Format=\"Dropdown\" Name=\"Creditor\" Title=\"Creditor\" Type=\"Choice\" ID=\"{dcd1ba0c-251b-4459-9151-6cd1983c14e9}\" StaticName=\"Creditor\" CustomFormatter=\"\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" Indexed=\"TRUE\" ShowInFiltersPane=\"Pinned\" Description=\"RETIRED 18112020\"><CHOICES><CHOICE>Brackens Print</CHOICE></CHOICES></Field>"
        },
        {
          "verb": "addSPLookupFieldXml",
          "schemaXml": "<Field Type=\"Lookup\" DisplayName=\"Council Creditor\" Description=\"Invoice creditor\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" ShowField=\"Title\" UnlimitedLengthInDocumentLibrary=\"FALSE\" RelationshipDeleteBehavior=\"None\" ID=\"{5437d33b-ac1f-444a-9f90-b4bb74142b68}\" StaticName=\"Council_x0020_Creditor\" Name=\"Council_x0020_Creditor\" Group=\"\" Indexed=\"FALSE\" />",
          "targetListName": "Creditors"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field DisplayName=\"Invoice No\" Format=\"Dropdown\" MaxLength=\"255\" Name=\"InvoiceNo\" Title=\"Invoice No\" Type=\"Text\" ID=\"{050b09de-bcfa-4a14-a455-9fdc8a888c58}\" StaticName=\"InvoiceNo\" CustomFormatter=\"\" Required=\"TRUE\" EnforceUniqueValues=\"FALSE\" Indexed=\"TRUE\" ShowInFiltersPane=\"Auto\" Description=\"If entering a date instead of invoice number please use the format YYYYMMDD\"><Validation Message=\"Special characters are not allowed. (“*:&lt;&gt;?/\\&amp;#%)\">=AND(IF(ISERROR(FIND(\",\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\"&amp;\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\";\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\"[\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\"+\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\":\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\")\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\"*\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\"(\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\"$\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\"%\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\"~\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\"#\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\"]\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\".\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\"!\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\"@\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\"/\",InvoiceNo)),TRUE),IF(ISERROR(FIND(\"\\\",InvoiceNo)),TRUE))</Validation></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field DisplayName=\"Invoice Month\" FillInChoice=\"FALSE\" Format=\"Dropdown\" Name=\"InvoiceMonth\" Required=\"TRUE\" Title=\"Invoice Month\" Type=\"Choice\" ID=\"{25e6903a-93f3-4c44-a0c3-5d5a0fb52eca}\" StaticName=\"InvoiceMonth\" ShowInFiltersPane=\"Pinned\" Indexed=\"TRUE\" AutoIndexed=\"TRUE\"><CHOICES><CHOICE>January</CHOICE><CHOICE>February</CHOICE><CHOICE>March</CHOICE><CHOICE>April</CHOICE><CHOICE>May</CHOICE><CHOICE>June</CHOICE><CHOICE>July</CHOICE><CHOICE>August</CHOICE><CHOICE>September</CHOICE><CHOICE>October</CHOICE><CHOICE>November</CHOICE><CHOICE>December</CHOICE></CHOICES></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field Type=\"URL\" DisplayName=\"ReferenceLink\" Description=\"Link to a reference document that relates to the invoice\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" Indexed=\"FALSE\" Format=\"Hyperlink\" ID=\"{a9a7e86d-aaa3-4f61-af02-31d086f45fed}\" StaticName=\"ReferenceLink\" Name=\"ReferenceLink\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field Type=\"Text\" DisplayName=\"ReferenceComment\" Description=\"Brief comment from the signatories re the invoice if needed\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" Indexed=\"TRUE\" MaxLength=\"255\" ID=\"{3ec6b3b2-cb1a-42c6-b472-58eb6d86e82e}\" StaticName=\"ReferenceComment\" Name=\"ReferenceComment\" AutoIndexed=\"TRUE\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{39360f11-34cf-4356-9945-25c44e68dade}\" ReadOnly=\"TRUE\" Hidden=\"TRUE\" Type=\"Text\" Name=\"File_x0020_Type\" DisplayName=\"File Type\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"File_x0020_Type\" FromBaseType=\"TRUE\" Indexed=\"FALSE\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{47b1b86f-9f8a-4dbe-a75e-ca5d9b0f566c}\" Type=\"URL\" Name=\"_ShortcutUrl\" DisplayName=\"Shortcut URL\" DisplaceOnUpgrade=\"TRUE\" Indexed=\"FALSE\" Required=\"FALSE\" Hidden=\"TRUE\" ReadOnlyField=\"TRUE\" ShowInEditForm=\"FALSE\" ShowInDisplayForm=\"FALSE\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"_ShortcutUrl\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{2662ad77-2410-4938-b01c-e5e43321bad4}\" Type=\"Guid\" Name=\"_ShortcutSiteId\" DisplayName=\"Shortcut Site Id\" DisplaceOnUpgrade=\"TRUE\" Indexed=\"FALSE\" Required=\"FALSE\" Hidden=\"TRUE\" ReadOnlyField=\"TRUE\" ShowInEditForm=\"FALSE\" ShowInDisplayForm=\"FALSE\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"_ShortcutSiteId\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{e2a3861f-c216-47d7-820f-7cb638862ab2}\" Type=\"Guid\" Name=\"_ShortcutWebId\" DisplayName=\"Shortcut Web Id\" DisplaceOnUpgrade=\"TRUE\" Indexed=\"FALSE\" Required=\"FALSE\" Hidden=\"TRUE\" ReadOnlyField=\"TRUE\" ShowInEditForm=\"FALSE\" ShowInDisplayForm=\"FALSE\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"_ShortcutWebId\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{e8fea999-553d-4f45-be52-d941627e9fe5}\" Type=\"Guid\" Name=\"_ShortcutUniqueId\" DisplayName=\"Shortcut Unique Id\" DisplaceOnUpgrade=\"TRUE\" Indexed=\"FALSE\" Required=\"FALSE\" Hidden=\"TRUE\" ReadOnlyField=\"TRUE\" ShowInEditForm=\"FALSE\" ShowInDisplayForm=\"FALSE\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"_ShortcutUniqueId\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{8c06beca-0777-48f7-91c7-6da68bc07b69}\" ReadOnly=\"TRUE\" Type=\"DateTime\" Name=\"Created\" DisplayName=\"Created\" StorageTZ=\"TRUE\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"Created\" FromBaseType=\"TRUE\" Indexed=\"TRUE\" AutoIndexed=\"TRUE\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}\" ReadOnly=\"TRUE\" Type=\"DateTime\" Name=\"Modified\" DisplayName=\"Modified\" StorageTZ=\"TRUE\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"Modified\" FromBaseType=\"TRUE\" Indexed=\"TRUE\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{1df5e554-ec7e-46a6-901d-d85a3881cb18}\" ReadOnly=\"TRUE\" Type=\"User\" List=\"UserInfo\" Name=\"Author\" DisplayName=\"Created By\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"Author\" FromBaseType=\"TRUE\" Indexed=\"FALSE\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field Type=\"Text\" DisplayName=\"CouncilCreditorTXT\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" Indexed=\"TRUE\" MaxLength=\"255\" ID=\"{c382047b-fe7b-4271-a6be-59e418ca2b97}\" StaticName=\"CouncilCreditorTXT\" Name=\"CouncilCreditorTXT\" AutoIndexed=\"TRUE\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{e52012a0-51eb-4c0c-8dfb-9b8a0ebedcb6}\" ReadOnly=\"TRUE\" Type=\"Computed\" Name=\"Combine\" DisplaceOnUpgrade=\"TRUE\" DisplayName=\"Merge\" Filterable=\"FALSE\" Sortable=\"FALSE\" Hidden=\"TRUE\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"Combine\"><FieldRefs><FieldRef Name=\"FSObjType\" Key=\"Primary\" /><FieldRef Name=\"EncodedAbsUrl\" /><FieldRef Name=\"TemplateUrl\" /></FieldRefs><DisplayPattern><IfEqual><Expr1><Field Name=\"FSObjType\" /></Expr1><Expr2>0</Expr2><Then><HTML><![CDATA[<input id=\"chkCombine\" type=\"CHECKBOX\" title=\"Merge]]\" href=\"]]></HTML><Field Name=\"EncodedAbsUrl\" /><HTML><![CDATA[\">]]></HTML><HTML><![CDATA[<input id=\"chkUrl\" type=\"HIDDEN\" href=\"]]></HTML><Column Name=\"TemplateUrl\" HTMLEncode=\"TRUE\" /><HTML><![CDATA[\">]]></HTML><HTML><![CDATA[<input id=\"chkProgID\" type=\"HIDDEN\" href=\"]]></HTML><MapToControl><HTML>|</HTML><GetFileExtension><Column Name=\"TemplateUrl\" HTMLEncode=\"TRUE\" /></GetFileExtension></MapToControl><HTML><![CDATA[\">]]></HTML></Then></IfEqual></DisplayPattern></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{5d36727b-bcb2-47d2-a231-1f0bc63b7439}\" ReadOnly=\"TRUE\" Type=\"Computed\" Name=\"RepairDocument\" DisplaceOnUpgrade=\"TRUE\" DisplayName=\"Relink\" Filterable=\"FALSE\" Sortable=\"FALSE\" Hidden=\"TRUE\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"RepairDocument\"><FieldRefs><FieldRef Name=\"FSObjType\" Key=\"Primary\" /><FieldRef Name=\"ID\" /></FieldRefs><DisplayPattern><IfEqual><Expr1><Field Name=\"FSObjType\" /></Expr1><Expr2>0</Expr2><Then><HTML><![CDATA[<input id=\"chkRepair\" type=\"CHECKBOX\" title=\"Relink\" docid=\"]]></HTML><Field Name=\"ID\" /><HTML><![CDATA[\">]]></HTML></Then></IfEqual></DisplayPattern></Field>"
        },
        {
          "verb": "addSPView",
          "name": "Invoices not processed",
          "viewFields": [
            "DocIcon",
            "LinkFilename",
            "EnteredintoAuthority",
            "UrgentPayment",
            "Code",
            "ReferenceComment",
            "PONumber",
            "Signatory",
            "SignedBySignatory",
            "Signatory2",
            "SignedBySignatory2",
            "Withdrawn",
            "OnHold",
            "Council_x0020_Creditor",
            "InvoiceNo",
            "InvoiceMonth"
          ],
          "query": "<OrderBy><FieldRef Name=\"Created\" Ascending=\"FALSE\" /><FieldRef Name=\"LinkFilename\" /></OrderBy><Where><And><IsNull><FieldRef Name=\"EnteredintoAuthority\" /></IsNull><Neq><FieldRef Name=\"Withdrawn\" /><Value Type=\"Boolean\">1</Value></Neq></And></Where>",
          "rowLimit": 10,
          "isPaged": true,
          "formatterJSON": "",
          "replaceViewFields": true
        }
      ]
    }
  ]
}

Here in this JSON, where I have to replace new Name for List/Library in the place of listName property under the actions array.

I tried by looping through the actions array and replaced the list name with new name, but not sure to update whole object and use it as site script

Thanks, Arun

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.