Getting started
User guide
- Settings
- Form sets
- Containers
- Controls
- SharePoint fields
- Common fields
- JavaScript
- CSS
- SharePoint form panel
- SharePoint web parts
- Microsoft Teams tab
- Forms versioning
Provisioning forms
Examples
- Ticket management system
- Dynamic form for a user group
- Conference room reservation system
- Discussion within a SharePoint form
- Version history within a SharePoint form
- Organize related docs in libraries and folders
- Duplicate item button for List or Library
- Move new form page to another location
General
- YouTube
- Licensing
- Manage subscription
- Billing and payments
- Privacy policy
- Data protection and security
- Version history (Microsoft 365)
- Version history (SharePoint 2019/SE)
Multilingual support
Navigation between forms
- Generate a link to a SharePoint form
- Redirect user after form submission
- Open edit form by default for a user group
- Open form in a dialog
Generating PDF documents
- Save SharePoint form as PDF
- Generate PDF from DOCX template with Plumsail Processes
- Generate PDF from DOCX template with Word Online (Business)
Integration with Power Automate
Custom routing based on SharePoint and Microsoft 365 groups
You can configure routing by user group using automatic routing. But if you need more complex conditions including not only user membership but also field values, profile properties, or other extra clauses, use programmatic routing.
This page provides code examples for routing based on user membership and current item field values.
Routing based on SharePoint security groups
You can use custom routing and PnPjs library to check if the current user is a member of SharePoint group.
Redirect to the custom Form Set depending on the user membership and Status field value:
// get all groups the current user belongs to
const groups = await web.currentUser.groups();
const userGroups = groups.map(g => g.Title);
// ge the 'Status' field value
const { Status } = await item.get();
// check if the user is a manager
if (userGroups.includes('Managers')) {
if (Status === 'Waiting for approval') {
return '9c49268c-8d61-4069-99b3-ff394cbb07dd';
}
if (Status === 'Approved') {
return '830f561b-544b-42da-9f86-774e64503183';
}
}
Routing based on Microsoft 365 groups
You can use custom routing and Microsoft Graph client to retrieve Microsoft 365 groups and check the current user membership.
Important
In order to retrieve user profile properties with Graph API, you first need to make sure that the Microsoft Graph client has the permissions to check if the current user belongs to specific 365 groups of your tenant.
For this, make sure to install Microsoft 365 CLI (you’ll need to install Node.js first in order to do that).
Connect it to your Office 365 tenant from the command line:
m365 login
And then use the following line to give Microsoft Graph the required permissions:
m365 spo serviceprincipal grant add --resource "Microsoft Graph" --scope "Directory.Read.All"
We check the user’s groups and only redirect user to the Form if they belong to the HelpDesk Agents group, using the following code, just replacing Form Set ID with the one that we’ve copied on the form:
// get all groups the current user belongs to
const groups = await graph.me.memberOf();
const userGroups = groups.map(g => g.Title);
// ge the 'Status' field value
const { Status } = await item.get();
// check if the user is a manager
if (userGroups.includes('Managers')) {
if (Status === 'Waiting for approval') {
return '9c49268c-8d61-4069-99b3-ff394cbb07dd';
}
if (Status === 'Approved') {
return '830f561b-544b-42da-9f86-774e64503183';
}
}