Create Form sets in Plumsail Forms for SharePoint

 


                        

Create Form sets in Plumsail Forms for SharePoint






How Form Sets are created ?


  • Open Plumsail Forms designer

Default Form Sets can be opened by any user unless they are redirected to custom one.
  • To create a new form set, click on "+" sign next to form set name, give it a name and click save.

To change form set name and properties click on pen icon


Routing based on Azure AD group

In our scenario, we have already created a default form and custom form set.
In default form, all fields are read only.
Full control form set should open automatically for AD group


Click on the Pen icon under Azure AD group tab, write group name and search, select the group that you need.
You can select multiple users & groups if needed.



Testing of sample users:

  • Jane does not belong to Admin ID group so the entry created by her is not routed to other form but to default form.



  • Elizabeth Holmes belong to Admin ID group so the entry created by her is routed to "Full Control" form set.



Routing based on SharePoint group membership

  • Select Manager Form Set

  • Click on the pen icon, open properties and switch to SharePoint Group tab. Enter "Manager" as the name, write group name and search, select the group that I need


If the user belongs to Site Owners, open this form set.


  • John Doe belongs to SharePoint Main Owners group and so is redirected to Manager form set.



  • Jane does not belong to SharePoint Main Owners group so the entry created by her is not routed to other form but to default form.

These are simple examples of "How to control existing data" using form sets and automatic routing.


                                    Custom Routing


You can use Custom Routing to route form sets based on complex logic.
Below is the method how to configure Custom Routing based on items filled values.



  • Design a form which contains Title, Status, AssignedTo fields in read only mode


  • Team Lead form sets contains Title,Status,AssignedTo  and Task List. 


To check if the current user is in AssignedTo field and redirect it to Team Lead form set. If Status field value is closed, redirect user to the home page.


   For redirecting to Team Lead form if user is in AssignedField, automatic routing is used.
   While redirecting to Home Page if the status field is set to Closed, below javascript code 
                                    if (condition) 
                                       return formsetID;

To achieve this, copy the form set ID from below the respective form
           Form Set ID can be found in the lower left corner of the designer, it can be copied with a button click:

Form Set ID

        If the code returns nothing or throws an error, default routing is applied.

Check item’s field

        Redirect to a certain Form Set if ‘Status’ field equals ‘Closed’:
        
//check if Item already exists, will return true for Edit and Display Form
if (item) {
    // return Promise
    return item.get()
        .then(function (item) {
            //if Item's Status is Closed, redirect
            if (item.Status === 'Closed') {
                //return ID of a Form Set
                return 'e5e313e7-73cd-4db1-8e51-b9023dbd595f'
            }
        });
}

 Testing of sample users:


  • John Doe is not in the AssignedTo field of this SharePoint List Item, redirect it to default form.




whereas Jane Doe is in the AssignedTo 
field of this SharePoint List Item, redirect it to "Team Lead" Form.


If the Status is "Closed", user is redirected to Home Page.




Comments

Popular posts from this blog

SharePoint Basics - Part 4 : List & Libraries

SharePoint Basics Part 2