Person or Group Field Won't Populate in Workflow

  • 27 November 2019
  • 14 replies
  • 80 views

Badge +8

I have a workflow that I'm trying to get a person or group field to populate with a SharePoint group depending on what team is selected from the form. I need to send notification to the group of an assigned task. The field does not get set in the workflow, but after the workflow completes the field is populated with the correct group name. What's the deal?


14 replies

Badge +5

How are you choosing the team in the form? Is it via a list item update after outcome, or via a people picker field on the task form ?

 

If you're doing it via an update, have you got a "Commit Pending Changes" following it?

Badge +8

I am using an Update Item action. Yes I put a Commit Pending Changes after it. I made sure the Person or Group type specifies People and Groups. Pulling my hair out here!

Badge +12

@rogerb ....how you're generating the name of the group? After generating the name of the group and before updating it.....can you try to log it in history and see what value is giving you? Also, I'll put that value between quotes to see what exactly I'm getting.

Badge +8

I am just using the people picker in the Update Item action. Then I tried setting a variable with the group, that didn't work either. I will try logging the variable to the history list now.

Badge +8

Ok, when I put the group name variable out to the history list this is what I get.

 

GROUP VARIABLE=877;#TEAM NAME

Badge +12

@rogerb .....how you decide which SharePoint group needs to be selected? Is there a lookup list you're using?

Badge +8

Attached is the screenshot of what my Update Item looks like. I use the Browse function to find the SharePoint group name.

 

FYI, I typed TEAM NAME in there just as an example. The actual SharePoint group I was using resolves and is underlined.

Badge +12

@rogerb ....In your original post, you mentioned that based on the team selected on the form, the workflow populates the SP group, but based on your screenshot it seems you're hardcoding the SP group (which is confusing for me !!!)

 

Instead why don't you use team field (item property) and build string action to build your SP group name and store it in SLT variable and use that variable to assign permission?

Badge +8

Ah, I've solved it! I just put a one minute pause after the update and that's got it sorted.

Badge +8

Yeah, the workflow logic branches based on team selected from the form. Then the value is hard coded like in the screenshot.

Badge +12

@rogerb ....Instead can you try using commit pending changes action? Not a big fan of pause due to it's dependency on timer service... :D

Badge +8

I already tried commit pending changes and it didn't work.

Badge +8

So it turns out the pause I've used is not exactly loved. The problem is the the pause depends on the SP workflow timer service, which holds the workflow up for at least 10 minutes and sometimes for more than an hour in extreme cases. That is unacceptable. I've tried the "Wait for item update" action but that doesn't work either. The field actually holds the user ID for the group at this point in the workflow so it's NOT NULL! So the Wait action is useless in this case.

 

Is this a bug in the system? Please help!

Badge +8

I've figured out a solution for this issue. I have the group name saved to a variable, so I just used that value in my email. I had to strip out the user ID with a regex, but now it works with no pause!

Reply