sitescripts attempt

This commit is contained in:
Russell gove 2021-07-02 18:08:31 -04:00
parent e0c6e97b1e
commit 4c75e5982d
6 changed files with 296 additions and 2 deletions

View File

@ -59,8 +59,19 @@ Version|Date|Comments
* `npm install`
* `gulp serve`
> Include any additional steps as needed.
> DELETE THIS PARAGRAPH BEFORE SUBMITTING
Create two Lists to hold the List of RFX's and the list of RFX Folders.
The lists must have the schemas below (using site content types is not needed)
The RFX List:
![mainpanel](assets/RFX.png "RFX")
(The title was renamed to RFX Number)
The RFX Folder List
![mainpanel](assets/RFXFolders.png "RFXFolders")
(The RFx column is a lookup to the Title/RFX Number in the RFx list)
The scripts folder contains some feeble attempts to generate these lists using a sitescript.
If anyone is good at that , I could use some help!
## Features

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,5 @@
cd C:\Users\trwg1\sp-dev-fx-webparts\samples\react-private-libraries\scripts\
#connect-pnponline -Url "https://russellwgove.sharepoint.com/sites/deleteme"
$it=Get-Content '.\rfx.json'-Raw
Add-PNPSiteScript -Title "RFx Lists" -Content $it

View File

@ -0,0 +1,69 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json",
"actions": [{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type='Text' DisplayName='Closing Date' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden = 'FALSE' ID='{2701f2bf-d45f-4672-9774-6dab88b9792d}' Name='rfxClosingDate' StaticName='rfxClosingDate' MaxLength='255' Customization='' PITarget='' PIAttribute = '' PrimaryPIAttribute='' Aggregation='' Node='' />",
"pushChanges": true
},
{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type='User' DisplayName='Contract Specialist' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden = 'FALSE' ID='{843f09c7-19cb-4889-8b39-d3132643568c}' Name='rfxContractSpecialist' StaticName='rfxContractSpecialist' ShowField='ImnName' UserSelectionScope='0' UserSelectionMode = 'PeopleOnly' List='UserInfo' Customization='' PITarget='' PrimaryPITarget='' PIAttribute='' PrimaryPIAttribute='' Aggregation='' Node='' />",
"pushChanges": true
},
{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type='Note' DisplayName='Description' Group='Custom Columns' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden = 'FALSE' Sortable='FALSE' ID='{a04fc484-b807-4fef-a970-cbd007deeb87}' Name='rfxDescription' StaticName='rfxDescription' RichText='TRUE' RichTextMode='FullHtml' IsolateStyles = 'TRUE' AppendOnly='FALSE' NumLines='6' UnlimitedLengthInDocumentLibrary='FALSE' Customization='' PITarget='' PrimaryPITarget='' PIAttribute='' PrimaryPIAttribute = '' Aggregation='' Node='' />",
"pushChanges": true
},
{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type='Number' DisplayName='Owners Group Id' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden = 'FALSE' ID='{34889607-f472-4d16-8f5b-b5ba6617c6cd}' Name='rfxOwnersGroupId' StaticName='rfxOwnersGroupId' Percentage='FALSE' Customization='' PITarget='' PrimaryPITarget = '' PIAttribute='' PrimaryPIAttribute='' Aggregation='' Node='' />",
"pushChanges": true
},
{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type='Number' DisplayName='Library Members Group Id' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden = 'FALSE' ID='{a395c515-2e66-4009-9704-64533250b082}' Name='rfxLibraryMembersGroupId' StaticName='rfxLibraryMembersGroupId' Percentage='FALSE' Customization='' PITarget='' PrimaryPITarget='' PIAttribute='' PrimaryPIAttribute='' Aggregation='' Node='' />",
"pushChanges": true
},
{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type='Number' DisplayName='Library Visitors Group Id' Group='Custom Columns' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly = 'FALSE' CanToggleHidden='FALSE' ID='{b0f7ea7e-1bf3-44d7-a293-9b1c6b6af67c}' Name='rfxLibraryVisitorsGroupId' StaticName='rfxLibraryVisitorsGroupId' Percentage='FALSE' Customization = '' PITarget='' PrimaryPITarget='' PIAttribute='' PrimaryPIAttribute='' Aggregation='' Node='' />",
"pushChanges": true
},
{
"verb": "createContentType",
"name": "RFX",
"id": "0x0100C654015369B79E4DA6572D4FE4C0BFBD",
"description": "",
"parentId": "0x01",
"hidden": false,
"group": "_RFX",
"subactions": [{
"verb": "addSiteColumn",
"internalName": "rfxClosingDate"
},
{
"verb": "addSiteColumn",
"internalName": "rfxContractSpecialist"
},
{
"verb": "addSiteColumn",
"internalName": "rfxDescription"
},
{
"verb": "addSiteColumn",
"internalName": "rfxOwnersGroupId"
},
{
"verb": "addSiteColumn",
"internalName": "rfxLibraryMembersGroupId"
},
{
"verb": "addSiteColumn",
"internalName": "rfxLibraryVisitorsGroupId"
}
]
}
]
}

View File

@ -0,0 +1,209 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json",
"actions": [{
"verb": "createSiteColumnXml",
"schemaXml": null,
"pushChanges": true
},
{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type='Number' DisplayName='Folder Visitors Group Id' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden = 'FALSE' ID='{0c44d811-1669-4109-b2ae-133c764e2eb3}' Name='rfxFolderVisitorsGroupId' StaticName='rfxFolderVisitorsGroupId' Percentage='FALSE' Customization='' PITarget='' PrimaryPITarget='' PIAttribute='' PrimaryPIAttribute='' Aggregation='' Node='' />",
"pushChanges": true
},
{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type='Number' DisplayName='Folder Members Group Id' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden = 'FALSE' ID='{26b670d4-2d58-4798-becf-f869a3b28497}' Name='rfxFolderMembersGroupId' StaticName='rfxFolderMembersGroupId' Percentage='FALSE' Customization='' PITarget = '' PrimaryPITarget='' PIAttribute='' PrimaryPIAttribute='' Aggregation='' Node='' />",
"pushChanges": true
},
{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type='Text' DisplayName='Closing Date' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden = 'FALSE' ID='{2701f2bf-d45f-4672-9774-6dab88b9792d}' Name='rfxClosingDate' StaticName='rfxClosingDate' MaxLength='255' Customization='' PITarget='' PrimaryPITarget='' PIAttribute = '' PrimaryPIAttribute='' Aggregation='' Node='' />",
"pushChanges": true
},
{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type='User' DisplayName='Contract Specialist' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden = 'FALSE' ID='{843f09c7-19cb-4889-8b39-d3132643568c}' Name='rfxContractSpecialist' StaticName='rfxContractSpecialist' ShowField='ImnName' UserSelectionScope='0' UserSelectionMode = 'PeopleOnly' List='UserInfo' Customization='' PITarget='' PrimaryPITarget='' PIAttribute='' PrimaryPIAttribute='' Aggregation='' Node='' />",
"pushChanges": true
},
{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type='Note' DisplayName='Description' Group='Custom Columns' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden = 'FALSE' Sortable='FALSE' ID='{a04fc484-b807-4fef-a970-cbd007deeb87}' Name='rfxDescription' StaticName='rfxDescription' RichText='TRUE' RichTextMode='FullHtml' IsolateStyles = 'TRUE' AppendOnly='FALSE' NumLines='6' UnlimitedLengthInDocumentLibrary='FALSE' Customization='' PITarget='' PrimaryPITarget='' PIAttribute='' PrimaryPIAttribute = '' Aggregation='' Node='' />",
"pushChanges": true
},
{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type='Number' DisplayName='Owners Group Id' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden = 'FALSE' ID='{34889607-f472-4d16-8f5b-b5ba6617c6cd}' Name='rfxOwnersGroupId' StaticName='rfxOwnersGroupId' Percentage='FALSE' Customization='' PITarget='' PrimaryPITarget = '' PIAttribute='' PrimaryPIAttribute='' Aggregation='' Node='' />",
"pushChanges": true
},
{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type='Number' DisplayName='Library Members Group Id' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden = 'FALSE' ID='{a395c515-2e66-4009-9704-64533250b082}' Name='rfxLibraryMembersGroupId' StaticName='rfxLibraryMembersGroupId' Percentage='FALSE' Customization='' PITarget='' PrimaryPITarget='' PIAttribute='' PrimaryPIAttribute='' Aggregation='' Node='' />",
"pushChanges": true
},
{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type='Number' DisplayName='Library Visitors Group Id' Group='Custom Columns' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly = 'FALSE' CanToggleHidden='FALSE' ID='{b0f7ea7e-1bf3-44d7-a293-9b1c6b6af67c}' Name='rfxLibraryVisitorsGroupId' StaticName='rfxLibraryVisitorsGroupId' Percentage='FALSE' Customization = '' PITarget='' PrimaryPITarget='' PIAttribute='' PrimaryPIAttribute='' Aggregation='' Node='' />",
"pushChanges": true
},
{
"verb": "createContentType",
"name": "RFXFolder",
"id": "0x010061598027686ADA4CA1D35CA1D0DEC987",
"description": "",
"parentId": "0x01",
"hidden": false,
"group": "_RFX",
"subactions": [{
"verb": "addSiteColumn",
"internalName": "RFx"
},
{
"verb": "addSiteColumn",
"internalName": "rfxFolderVisitorsGroupId"
},
{
"verb": "addSiteColumn",
"internalName": "rfxFolderMembersGroupId"
}
]
},
{
"verb": "createContentType",
"name": "RFX",
"id": "0x0100C654015369B79E4DA6572D4FE4C0BFBD",
"description": "",
"parentId": "0x01",
"hidden": false,
"group": "_RFX",
"subactions": [{
"verb": "addSiteColumn",
"internalName": "rfxClosingDate"
},
{
"verb": "addSiteColumn",
"internalName": "rfxContractSpecialist"
},
{
"verb": "addSiteColumn",
"internalName": "rfxDescription"
},
{
"verb": "addSiteColumn",
"internalName": "rfxOwnersGroupId"
},
{
"verb": "addSiteColumn",
"internalName": "rfxLibraryMembersGroupId"
},
{
"verb": "addSiteColumn",
"internalName": "rfxLibraryVisitorsGroupId"
}
]
},
{
"verb": "createSPList",
"listName": "RFxs",
"templateType": 100,
"subactions": [{
"verb": "addContentType",
"name": "RFX",
"id": "0x0100C654015369B79E4DA6572D4FE4C0BFBD"
},
{
"verb": "addSPFieldXml",
"schemaXml": "<Field ID='{fa564e0f-0c70-4ab9-b863-0177e6ddd247}' Type='Text' Name='Title' DisplayName='RFx Number' Required='TRUE' SourceID='http://schemas.microsoft.com/sharepoint/v3' StaticName='Title' FromBaseType='TRUE' Indexed='TRUE' EnforceUniqueValues='TRUE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden='FALSE' MaxLength = '255' Sealed='FALSE' Customization='' PITarget='' PrimaryPITarget='' PIAttribute='' PrimaryPIAttribute='' Aggregation='' Node='' />"
},
{
"verb": "addSPFieldXml",
"schemaXml": "<Field Type='Text' DisplayName='Closing Date' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden = 'FALSE' ID='{2701f2bf-d45f-4672-9774-6dab88b9792d}' Name='rfxClosingDate' StaticName='rfxClosingDate' MaxLength='255' />"
},
{
"verb": "addSPFieldXml",
"schemaXml": "<Field Type='Number' DisplayName='Library Members Group Id' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden='FALSE' ID='{a395c515-2e66-4009-9704-64533250b082}' Name='rfxLibraryMembersGroupId' StaticName='rfxLibraryMembersGroupId' Percentage='FALSE' />"
},
{
"verb": "addSPFieldXml",
"schemaXml": "<Field Type='Number' DisplayName='Library Visitors Group Id' Group='Custom Columns' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly = 'FALSE' CanToggleHidden='FALSE' ID='{b0f7ea7e-1bf3-44d7-a293-9b1c6b6af67c}' Name='rfxLibraryVisitorsGroupId' StaticName='rfxLibraryVisitorsGroupId' Percentage='FALSE' /> "
},
{
"verb": "addSPFieldXml",
"schemaXml": "<Field Type='Number' DisplayName='Owners Group Id' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden = 'FALSE' ID='{34889607-f472-4d16-8f5b-b5ba6617c6cd}' Name='rfxOwnersGroupId' StaticName='rfxOwnersGroupId' Percentage='FALSE' />"
},
{
"verb": "addSPFieldXml",
"schemaXml": "<Field Type='Note' DisplayName='Description' Group='Custom Columns' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden = 'FALSE' Sortable='FALSE' ID='{a04fc484-b807-4fef-a970-cbd007deeb87}' Name='rfxDescription' StaticName='rfxDescription' RichText='TRUE' RichTextMode='FullHtml' IsolateStyles='TRUE' AppendOnly='FALSE' NumLines='6' UnlimitedLengthInDocumentLibrary='FALSE' />"
},
{
"verb": "addSPFieldXml",
"schemaXml": "<Field Type='User' DisplayName='Contract Specialist' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden = 'FALSE' ID = '{843f09c7-19cb-4889-8b39-d3132643568c}' Name = 'rfxContractSpecialist' StaticName = 'rfxContractSpecialist' ShowField = 'ImnName' UserSelectionScope = '0' UserSelectionMode = 'PeopleOnly' List = 'UserInfo' / > "
},
{
"verb": "addSPView",
"name": "All Items",
"viewFields": [
"LinkTitle",
"rfxClosingDate",
"rfxContractSpecialist",
"rfxOwnersGroupId",
"rfxLibraryMembersGroupId",
"rfxLibraryVisitorsGroupId"
],
"query": "",
"rowLimit": 30,
"isPaged": true,
"makeDefault": true,
"replaceViewFields": true
}
]
}, {
"verb": "createSPList",
"listName": "RFXFolders",
"templateType": 100,
"subactions": [{
"verb": "addContentType",
"name": "RFXFolder",
"id": "0x010061598027686ADA4CA1D35CA1D0DEC987"
},
{
"verb": "addSPFieldXml",
"schemaXml": "<Field ID='{fa564e0f-0c70-4ab9-b863-0177e6ddd247}' Type='Text' Name='Title' DisplayName='Folder Name' 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' Customization = '' PITarget = '' PrimaryPITarget = '' PIAttribute = '' PrimaryPIAttribute = '' Aggregation = '' Node = '' />"
},
{
"verb": "addSPFieldXml",
"schemaXml": "<Field Type='Number' DisplayName='Folder Visitors Group Id' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden='FALSE' ID='{0c44d811-1669-4109-b2ae-133c764e2eb3}' Name='rfxFolderVisitorsGroupId' StaticName='rfxFolderVisitorsGroupId' Percentage='FALSE' />"
},
{
"verb": "addSPFieldXml",
"schemaXml": "<Field Type='Number' DisplayName='Folder Members Group Id' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden='FALSE' ID='{26b670d4-2d58-4798-becf-f869a3b28497}' Name='rfxFolderMembersGroupId' StaticName='rfxFolderMembersGroupId' Percentage='FALSE' />"
},
{
"verb": "addSPLookupFieldXml",
"schemaXml": "<Field Type='Lookup' DisplayName='RFx' Group='_RFX' EnforceUniqueValues='FALSE' Required='FALSE' Hidden='FALSE' ReadOnly='FALSE' CanToggleHidden='FALSE' ID=' { dc4715d2 - d74f - 41 bc - 80 cb - ed55ef102a7a } ' Name=' RFx ' StaticName=' RFx ' ShowField=' Title ' UnlimitedLengthInDocumentLibrary=' FALSE ' />",
"targetListName": "RFxs"
},
{
"verb": "addSPFieldXml",
"schemaXml": "<Field ID='{5f190d91-3dbc-4489-9878-3c092caf35b6}' Hidden='TRUE' ReadOnly='TRUE' Type='Computed' Name='LinkTitle2' DisplayName='Folder Name' 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": [
"LinkTitle",
"RFx",
"rfxFolderVisitorsGroupId",
"rfxFolderMembersGroupId"
],
"query": "",
"rowLimit": 30,
"isPaged": true,
"makeDefault": true,
"replaceViewFields": true
}
]
}
]
}