locked
Workflow action Permission replace RRS feed

  • Question

  • Hey,

    I have a SP Designer Workflow witch changed the permission of a document. For this I use the “Permission replace” action for SP. The users which become the new permission come from an workflow parameter.

    When I have only one user it works perfect. But when I add more the one user in the workflow parameter the permission replace action failed.

    What can I do to use more than one user for permission change?

    Thanks for help

    Stefan


    Viele Grüße Stefan

    Kontakt unter Info@IT-Kiessig.de
    Thursday, January 19, 2012 8:45 PM

Answers

  • Stefan, I know what you mean.  You're saying that when the field has more than one person in it, the permission step doesn't work.  I learned that a long time ago and was quite disappointed.  You can only make this workflow action work with single-value field references, so to assign permissions to multiple people, you must either have multiple Person/Group fields and/or use Groups instead of individuals.  In the end, you can only reference a Person/Group field with a single value, else it doesn't work.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    • Marked as answer by Entan Ming Tuesday, January 31, 2012 2:53 AM
    Sunday, January 29, 2012 2:47 AM
  • Hello,

     

    It should work fine, look at this link:

    http://www.sharepointbriefing.com/spcode/article.php/3911751/Implementing-ItemLevel-Security-in-SharePoint-2010-and-2007.htm

     

     

    Please consider that "On Permission Replace Action, the workflow assumes the users are exists but need to be replaced”.

    What if the users are not exists?

    Workflow will create a group called “Workflow Users” to grant Limited Access to the new users.

     

     

    Best Regards,

    Megren | Blog


    www.megren.net
    Saturday, January 28, 2012 10:50 PM

All replies

  • Hello,

     

    It should work fine, look at this link:

    http://www.sharepointbriefing.com/spcode/article.php/3911751/Implementing-ItemLevel-Security-in-SharePoint-2010-and-2007.htm

     

     

    Please consider that "On Permission Replace Action, the workflow assumes the users are exists but need to be replaced”.

    What if the users are not exists?

    Workflow will create a group called “Workflow Users” to grant Limited Access to the new users.

     

     

    Best Regards,

    Megren | Blog


    www.megren.net
    Saturday, January 28, 2012 10:50 PM
  • Stefan, I know what you mean.  You're saying that when the field has more than one person in it, the permission step doesn't work.  I learned that a long time ago and was quite disappointed.  You can only make this workflow action work with single-value field references, so to assign permissions to multiple people, you must either have multiple Person/Group fields and/or use Groups instead of individuals.  In the end, you can only reference a Person/Group field with a single value, else it doesn't work.
    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    • Marked as answer by Entan Ming Tuesday, January 31, 2012 2:53 AM
    Sunday, January 29, 2012 2:47 AM
  • Thanks for your help. But how can I use a multiple Person/Group field to change the permissions?<o:p></o:p>

    I my document library I have 2 permissions multiple Person/Group fields (read and write).

    Now the workflow has to give to all persons in the read permission filed read permission to the document and to the write
    permission filed write permissions. But there must be the opportunity to use more then one person for the permission change.

    Thanks for your help.<o:p></o:p>



    Viele Grüße Stefan

    Kontakt unter Info@IT-Kiessig.de

    Thursday, February 9, 2012 9:43 AM
  • There isn't a direct way to do it.

    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force

    Thursday, February 9, 2012 5:44 PM
  • How has you solved it?

    Viele Grüße Stefan

    Kontakt unter Info@IT-Kiessig.de

    Friday, February 10, 2012 12:37 PM
  • I have found a way to solve the problem.

    I used 2 workflow actions. First I use “replace permission” to give only the document administrator access to the document and second I use “add permission” to give the user in the write field write-permissions.

    The column write is a multiple Person/Group field.

    Thanks for your help


    Viele Grüße Stefan

    Kontakt unter Info@IT-Kiessig.de

    • Proposed as answer by TresL Thursday, August 23, 2012 8:23 PM
    Friday, February 10, 2012 7:49 PM
  • How is that different?  I don't follow.  Are there multiple people in that person/group field and are both people given permissions based on being in that field?  What you described above isn't what we've been talking about.  YOu can of course assign individuals separately in separate actions, but it doesn't work when multiple people are in one person/group field.  What you said above was you gave "the user" in the Write field write permissions, but we've been talking about multiple users in the Write field.  Are you saying that worked, too?  Please clarify.

    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force

    Friday, February 10, 2012 11:30 PM
  • Yes this works. The Workflow action "add permissions" works with multiple user/group fields.

    The only thing is that the return value must be a "string".


    Viele Grüße Stefan

    Kontakt unter Info@IT-Kiessig.de

    Monday, February 13, 2012 8:51 AM
  • Yes this works. The Workflow action "add permissions" works with multiple user/group fields.

    The only thing is that the return value must be a "string".


    Viele Grüße Stefan

    Kontakt unter Info@IT-Kiessig.de


    But does it work with multiple values being referenced?  Your explanation only referred to one user in the multi-value field.  The steps you gave didn't explain how this problem got solved.  I'm still not sure what was different about what you wrote in your resolution.

    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force

    Monday, February 13, 2012 3:14 PM
  • Yes it works fine with a referred multi-value flied (with more then one user). The only thing is that the return value must be a string. 

    Viele Grüße Stefan

    Kontakt unter Info@IT-Kiessig.de

    Monday, February 13, 2012 4:59 PM
  • Stefan is right, i was struggling with the exact same problem for some hours or so.

    It only took me some hours because I have used "UserName" (defined in the list) instead of "Name" accidentally (defined within my content type) as the "show field" value for the "Person and Group" column - so be careful with the "show field" value, it obviously has influence on how you can use the field in other actions!!!

    So if you use a "person or group" (use "name" as show filed value!) column with "multiple values" checked, you can indeed use the "add permission" workflow action even with multiple users entered into the picker!

    regards Tom

    Monday, May 14, 2012 6:44 AM
  • Awesome, thank you so much Stefan for coming up with this - has worked like a champ! I'd been banging my head trying to figure it out.

    Clayton, did Stefan's last post address your questions? If not I can add details as needed but I think he's answered sufficiently (maybe an edit from "user" to "users" in his solution post is all that's necessary but I got the point for purposes of testing it out), enough for me to reproduce and have it work with multiple Person or Group values in the list item.

    Thanks again Stefan - great work!

    cheers /td


    • Edited by TresL Thursday, August 23, 2012 8:33 PM
    Thursday, August 23, 2012 8:29 PM