cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Workflow to update permissions for an entire list

Jump to solution

So I've figured out how to set item permissions on incoming items with the help of the community and it looks something like this: (Picture Attached)

Retrieve Data

Set Variable

Set Item Permissions

 

I've noticed that I can only run this workflow on one item at a time. Is there any way to open up the workflow and make it run on all current items instead of just the last submitted item?

Labels: (1)
Tags (1)
0 Kudos
Reply
7 Replies
Highlighted
Nintex Newbie

Re: Workflow to update permissions for an entire list

Jump to solution

Hi Chris,

 

what you can do is to create a Site Workflow. In this site workflow you perform a List query, where you return all items you want to start a workflow on. For these items you store the item IDs in a collection variable. Now you add a For each action, where you iterate the ID collection.

 

Inside the loop you add the Web service action. As the address you write the following: [current web url]/_vti_bin/nintexworkflow/workflow.asmx.

 

Here you can select the StartWorkflowOnListItem method. Enter the variable where you store the item ID, the list name and the workflow name. Be aware that if you have a lot of items, the workflow can run for quite a time.

 

You can even schedule the workflow to run regularly/at a specific time, via Site Settings -> Scheduled workflows.http://sps2013dev-mzi/sites/ggz/_layouts/NintexWorkflow/WorkflowScheduleList.aspx

View solution in original post

0 Kudos
Reply
Highlighted
Not applicable

Re: Workflow to update permissions for an entire list

Jump to solution

Ah hah. You have been a huge help Martin. I'm sure that I can use the other trick you showed me about a list and a variable and do the same? I don't have access to an account that can do the web service.

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Workflow to update permissions for an entire list

Jump to solution

What you could do if you dont want to use the web service is the following:

  • You create a hidden column in the list where your workflow runs
  • Next set the workflow on the list item to trigger on edit of this column
  • Then you can use the site workflow with the same setup (query into a collection) to update the hidden column in each list item
  • this can also be done using the 'Update multiple items' action instead of the loop and collection

This does change the last modified and modified by columns though.

0 Kudos
Reply
Highlighted
Not applicable

Re: Workflow to update permissions for an entire list

Jump to solution

That won't work then. The data is modified and created by sensitive. What I have been trying is:

I have a list that has the users and their groups, this works great for new submissions, just like you said.

Query List (created by)

Set Variable (group)

For Each (Collection)

Set Item Permissions (By Group)

Then I tried to Query and after that collection operation and so on from there. It doesn't seem to work that way.

0 Kudos
Reply
Highlighted
Not applicable

Re: Workflow to update permissions for an entire list

Jump to solution

What I have almost working is:

Query List: Store ID and Created by

Set Variable: Group if Username = Created By (Group and Username are in their own list)

For Each: ID Collection store in ID_Column

Update Item Permissions: Set the Group (variable) as contribute and another group as full control

The last working configuration of this that worked set all of the items' permissions to all of the groups that had ever created an item in the list.

0 Kudos
Reply
Highlighted
Not applicable

Re: Workflow to update permissions for an entire list

Jump to solution

Still looking for some assistance here. I've tried every permutation of settings I can think of. Obviously it's not setting the group with the IDs and created by data that I am gathering. Would a collection solve that? Do I need to make a collection and put all of the data from the lists in it?

0 Kudos
Reply
Highlighted
Not applicable

Re: Workflow to update permissions for an entire list

Jump to solution

Bump for assistance

0 Kudos
Reply