I have googled till my eyes are crossing and I cannot figure out how to set a person or group field value to a SharePoint group with a variable. I have a Calculated Value field that takes a location number and concatenates it with text to form the name of a SharePoint group for that location. The groups have already been created on the site and are available to the list.
I need to set item level permissions for the SharePoint group. The only way I've been able to make it work is to type the group name into a separate Person or Group column and let it resolve. When I do that, I can programmatically use the Person/Group column in the Set Item Permissions action. I need to copy what is in the Calculated Value column and put it in to the Person/Group column in the workflow. Any ideas? I have tried many permutations of variables, data types, single line text variables and nothing has worked thus far.
Hey @KHF ,
This is what I do when I hit things like this. I manually set that field to a person or group.
Then I use a Log to the History list action to log that, to see what it looks like. Then compare that, with what you are using to try to set that field.
I hope that helps.
Of course, right after I posted here I found an end-around sort of solution. I had tried to get it to show me what the actual text of the field by using log to history list and and never could get it to in a workflow. I ended up putting the location access group field on the main Location table and used a Calculated field on the Nintex form to get that value from a lookup. That gave me text like this: 6434;#520 BA Access, which I was then able to remove the initial characters and set the rest into a single line text column. I used that text column in the update item permissions and it worked.
@KHF in your calculated field where you're using lookup function, can you try putting the whole formula inside parse lookup formula? That should strip the ID information and should give the value only.