liveBook · Manning

SharePoint form

As explained in Practical Automation with PowerShell: Effective scripting from the console to the cloud

A SharePoint form is a web form automatically provided for adding and editing items in a SharePoint list.

A SharePoint form is the browser-based interface automatically provided when a SharePoint list is created. It lets users add and edit list items, while PowerShell retrieves submitted data and performs the required automation. This approach avoids making every user install PowerShell modules and supports submissions from phones and other browser-enabled devices, with SharePoint providing built-in security. section 11.1

The default form is usually sufficient for operational requests, while custom JSON or Power Apps can provide deeper customization. Its fields and behavior come from the underlying list, so the list design should reflect the workflow before users begin submitting requests. section 11.2.2

A practical SharePoint request form can be assembled by:

  • Creating a supporting Site Templates list and adding a Name field. section 11.2.2
  • Importing available web templates into that list so users can select from existing options. section 11.2.2
  • Creating a Site Requests list, placing it on the site’s navigation, and disabling unnecessary attachments. section 11.2.2
  • Renaming the default Title field to Site name, then adding Site URL and Status fields. section 11.2.2
  • Adding a required Template lookup connected to the Site Templates list. section 11.2.2

Site creation request

A user opens the automatically generated New item form, chooses a template, enters a site name, and submits a request. Hidden fields can retain the Site URL and initialize Status to Submitted, allowing later automation to track creation through Creating, Active, Retired, or Problem states. section 11.2.2

$xml = @"
<Field 
    Type="Lookup" 
    DisplayName="Template" 
    Required="TRUE" 
    EnforceUniqueValues="FALSE" 
    List="{$($templateList.Id)}" 
    ShowField="Title" 
    UnlimitedLengthInDocumentLibrary="FALSE" 
    RelationshipDeleteBehavior="None" 
    ID="{$(New-Guid)}" 
    SourceID="{$($list.Id)}" 
    StaticName="Template" 
    Name="Template" 
    ColName="int1" 
    RowOrdinal="0" 
/>
"@
Add-PnPFieldFromXml -List $list -FieldXml $xml

Inspect the lookup-field definition that connects the request form’s Template selection to the reusable Site Templates list. section 11.2.2

How Practical Automation with PowerShell: Effective scripting from the console to the cloud covers it

How deep it goes
Explains automatic list forms and field configuration, while deferring detailed custom JSON and Power Apps implementation.
Examples
Uses Site Templates and Site Requests lists with template, site name, Site URL, and status fields.
What it assumes
Assumes familiarity with PowerShell automation and SharePoint permissions while avoiding end-user PowerShell installation requirements.
What you can do after
Operate/configure a SharePoint request workflow by creating lists and fields with PnP PowerShell.
How it connects
Connects SharePoint forms with SharePoint lists, PowerShell, PnP cmdlets, lookup fields, and web-based automation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Practical Automation with PowerShell: Effective scripting from the console to the cloud. The section links point to the parts of the book it draws on.