Solved

Change permissions after a form is submitted

  • 29 January 2024
  • 7 replies
  • 67 views

Userlevel 1
Badge +9

Hello,

I am using O365 nintex forms and O365 nintex workflows. I need to change permissions per form that is submitted but based on a selection in my form (which in turns becomes the title in the SP list) but after the form is submitted. I see there is a control “Office 365 update item permission” but confused how to setup once I approach the items to update and the rest after that…

I want to:

1.) strip rights from item that  was inherited from parent site after submission

2.) apply the person whom created/submitted the form access as well as a handful of other users access

 

Could someone help me on how to even approach this? I don’t know where to begin and steps to handle this is greatly appreciated!

 

 

Note: I’ve tried going off of existing posts on this forum but a lot of the images are not available and makes it a bit difficult to grasp when trying to follow step by step.

icon

Best answer by jpacheco 1 February 2024, 15:48

View original

7 replies

Userlevel 5
Badge +13

Hi @jpacheco,

This is the action you would use to accomplish this scenario,

To remove the inherited permissions for an item, you need to make sure in this work action that the “Inherit permissions from parent” setting is No and the “Remove existing permissions” setting is Yes. You will then have to set the Target to a user or group, select the user name or group (insert reference to item properties), and set the Permission level. If I remember it correctly, you might have to configure this same action multiple times, one for each user and group you need to set permissions for. 

Also, make sure the Filters section is configured with the “Update items only when the following is true:” option is selected. Then configure the rest of the Filters section under “Update the items when column” settings, in which you typically will use the ID of item the workflow is running on.

Here is a link to the help documentation for this action: Office 365 update item permissions (nintex.com)

Userlevel 1
Badge +9

@bamaeric ,

Thanks for your response! So, I did your recommendation (as much as I understood) but my workflow suspended and I got the following error msg.

If you see, too, there are dashes that separates the variables “matched”, “ID”, and “itemURL” in that order and shown below...

 

Workflow error msg

I created two instances one to manage the GROUP and one to manage the USER.

 

In the GROUP permissions settings, I have the following configured within the first control…

 

For the USER permissions control I also have the following…

 

Userlevel 5
Badge +13

Couple of questions.

Which workflow action does the workflow fail on: the add group or add user?

Is the group you are trying to add a SharePoint group or an AD group?

The error message in you first screen shot seems to suggest that the query cannot find a matching item in the list.

Userlevel 1
Badge +9

@bamaeric,

I disabled the USER control and it seems to be failing on the GROUP control but then I reversed that and the same happens to the USER control as well.

The GROUP is an AD Group.

Could this msg be because I’m running the controls too early in the workflow (placement of controls in WF)? Should I create a separate workflow or am I missing something else?

Userlevel 5
Badge +13

I know you can add permissions to SharePoint groups with this action, but I do not think you can add AD groups to site permissions. I am not 100% sure about that, so maybe someone else can verify.

If the update permissions action for the user does not work, I still think that the issue is with the filter query not finding a match based on the error message you displayed. Try adding a test action like a Run If action with the same conditions configured as the update permissions action and add a “Log in history list” action inside. This will help you see if the condition returns a true or false result.

Userlevel 1
Badge +9

@bamaeric ,

Hello!

Ok, I went ahead and created a separate WF and used the following controls…I disabled the “IF” control as well as the “Permissions” control to log the title once its captured at the beginning and to verify its capturing it, and it is.

 

 

 

But when I go to enable the Run If control, I continue to get the same msg…I changed up the info in some areas and I also wanted to see if I could just add the domain/user in the “user or group name” section… but I don't think it's even getting that far?

 

 

Userlevel 1
Badge +9

@bamaeric ,

Well, something as simply typing in the column name under the filters is what fixed the error message I kept receiving. I was selecting the title field from the item properties...🤦‍♀️

Problem solved!

 

Reply