top of page

How to Check if SharePoint Group Exists Using NINTEX Workflow

Writer's picture: Vijai Anand RamalingamVijai Anand Ramalingam

In this article you will see how to check if a SharePoint group exists using a NINTEX workflow.

Introduction

In this article you will see how to check if the group exists in SharePoint site using NINTEX workflow. We will be using the web service "_vti_bin/usergroup.asmx" to check if the group exists in the SharePoint site. I have created a custom list named "Group Exists" in which I have the following columns:


The Group Name column specifies the group for which we will check if it exists in the site and the IsGroupExists column specifies the Boolean value.

Workflow Design



Group exists workflow

  • Navigate to the Group Exists list.

  • Click on the "List" tab and then click on "Workflow Settings".Click on "Create a Workflow" in Nintex Workflow.


  • Click on "Cancel".


  • Drag and drop the "Call web service" action from the Integration section.


  • You will then see the warning symbol in the workflow action.

  • Click on that and then you will be seeing the following warning message.


  • Click on "Configure" from the drop down list in the call web service action.


  • Click on the "Insert Reference" button for the URL column and then click on the "Common" tab. Select "Web URL" and then click on "Ok".


  • Append "/_vti_bin/usergroup.asmx" in the URL column.

  • Enter the User Name and Password to call the web service and then click on the "Reference" button.

  • Click on "Ok".


  • All the web service methods will be populated.

  • Select GetGroupCollectionFromWeb web method that will be used to get all the SharePoint groups from the website.


  • Click on the "Variables" button.


  • Enter the variable name and select the variable type.


  • Click on "Save".

  • The variable is created successfully.


  • Select the groupCollection variable for the "Store result in" drop down.


  • Click on "Save".

  • Drag and drop the "Regular Expression" action from the Operations section.


  • Click on Configure from the drop down list in the Regular Expression action.

  • Click on the "Insert Reference" button for the Pattern column and then click on the "Item Properties" tab.

  • Select "Group Name" and then click on "Ok".


  • Select "Check match" for Operation.

  • Click on the "Insert Reference" button for the Input text column and then click on the "Workflow Variables" tab.

  • Select "groupSelection" and then click on "Ok".


  • Click on the "Variables" button.Enter the variable name and select the variable type.


  • Click on "Save".The variable is created successfully.

  • Select "isGroupExists" from "Store result in" the drop down list.


  • Click on "Save".

  • Drag and drop the "Update Item" action from the "Libraries and lists" section.


  • Click on "Configure" from the drop down list in the "Update item" action.

  • Select the following values.


  • Click on "Save".


Publish the workflow

  • Click on the "Publish" button in the ribbon interface.


  • Ensure the Title is set; optionally you can set the values for Description and Change Comments.


  • Click on the "Submit" button.


  • The workflow is published successfully.



Test the workflow

  • Navigate to the Group Exits list.

  • Select the item and then click on "Workflows" in the ribbon interface.


  • Click on the "Group Exists" workflow and then click on the "Start" button.


  • After a few minutes the workflow status will be changed to "Completed".


  • IsGroupExists will return the Boolean value.


Summary

Thus in this article you have seen how to check if the group exists in the SharePoint site using a NINTEX workflow.

Related Links

0 comments

Yorumlar


bottom of page