Skip to main content
Nintex Community Menu Bar
Solved

Can I define a SharePoint group for setting item permissions using a variable

  • August 20, 2015
  • 6 replies
  • 31 views
  • Translate

I want to set the item permissions for submitted requests based on the site that submitted the request.  Each site has a SharePoint group with a name formatted "[site code] Members" where [site code] is the 3 character site code for each site and is an item property.  I created a workflow which sets a text variable to "[Site Code] Members", then sets item permission using that variable as the user.  When I run the workflow it says that the user is not found, even though it reads exactly right.  Is it possible to achieve this goal?

 

For a more specific example, I type "TUA Members" into the "Users" field in my workflow and it resolves the group name immediately.  When I leave it as the variable and run the workflow, the workflow output is "No user has been found with specified username "TUA Members".

 

Is there a way to dynamically define a SharePoint group name like this?

Best answer by cassymfreeman

OK instead of set variable, use Build string and enter [Site Code] Members and store that into your text variable for group name, and then set item permissions with that.  I have just tested it and it works a charm

View original
Did this topic help you find an answer to your question?

6 replies

Forum|alt.badge.img+16

so site code is an item property?  can you confirm you are using the set variable action and choosing the value of Site Code Members

Translate

Forum|alt.badge.img+16

also, what type of field is Site Code?

Translate

Forum|alt.badge.img+16

if it's a lookup or choice column you might find that it is not bringing it back as three letters as you would expect.  try logging to history list the item property returned for the item property site code.

Translate

  • Author
  • 1 reply
  • August 24, 2015

Thank you for your response, Cassy.

Yes, I am using the "Set Variable" action to set the value as you stated (Site Code Members).

Site Code is a text field.

I confirmed it is returning the correct value because the error in the history states "No user has been found with the name 'TUA Members'".

I also confirmed that this group name would otherwise resolve by setting the "Users" field in the "Set Item Permissions" action to "TUA Members".  But I noticed that this resolved immediately upon saving that action, as opposed to resolving when the workflow runs... which is what leads me to believe that what I'm trying to do isn't possible if the workflow doesn't actually resolve the user name while it's running.

Translate

Forum|alt.badge.img+16

OK instead of set variable, use Build string and enter [Site Code] Members and store that into your text variable for group name, and then set item permissions with that.  I have just tested it and it works a charm

Translate

  • 3 replies
  • April 23, 2021
Is it possible somehow to prohibit the usage of variables for setting permissions? I tested it with the Build string action but this is also not working for me, so I have the suspicion that our admins may have restricted something here.
Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings