cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
harfmt
Nintex Newbie

From Workflow - Check if People and Groups group contains members

Jump to solution

Prior to sending an approval request from a workflow to a People and Groups group, I'd like to check that the group has members. How would I do this using worklfow actions?

0 Kudos
Reply
6 Replies
emha
Nintex Newbie

Re: From Workflow - Check if People and Groups group contains members

Jump to solution

is it sharepoint group?

then you will have to use UserGroup.asmx webservice, method  GetUserCollectionFromGroup might be one that you need to call

https://msdn.microsoft.com/en-us/library/websvcusersgroups.usergroup_members.aspx

Reply
harfmt
Nintex Newbie

Re: From Workflow - Check if People and Groups group contains members

Jump to solution

So I successfully brought back the xml code into the 'Call Web Service' action during a 'Run Now'. I can't work out how to place that xml code into a variable so that I can parse it. 

How do I get the result back for parsing? I need the Names in the group. 

And when I attempt to Specify Elements it doesn't go down past GetUserCollectionFromGroupResult. And I get an error when trying to capture the m:GetUserCollectionFromGroupResult

(ERROR: Failed to invoke web service. 'undefined/undefined:m:GetUserCollectionFromGroupResult' has an invalid token.)

Failed to invoke web service. 'undefined/undefined:m:GetUserCollectionFromGroupResult' has an invalid token.

Reply
emha
Nintex Newbie

Re: From Workflow - Check if People and Groups group contains members

Jump to solution

let to return it default value.

then use Query XML action to parse returned result (varGroupUsers variable).

xpath like this should give you Names

/defaultNS:GetUserCollectionFromGroup/defaultNS:Users/defaultNS:User/@Name
Reply
harfmt
Nintex Newbie

Re: From Workflow - Check if People and Groups group contains members

Jump to solution

Hi Marian

That's what I did. varGroupUsers is always empty after calling the web service. Not sure why. 

Also, there are many names in the group, so I'd like to get them all back somehow into a collection variable.

Reply
emha
Nintex Newbie

Re: From Workflow - Check if People and Groups group contains members

Jump to solution

do you have anything configured in 'Result processing'? - leave it empty

what's the data type of varGroupUsers variable? - should be multiline text

try to setup error handling and mail error message to yourself whether there is not an error reported from webservice call.

Reply
harfmt
Nintex Newbie

Re: From Workflow - Check if People and Groups group contains members

Jump to solution

multiline text was good information. Found the following link that explained it all clearly.

How to Get All the Users From a Specific SharePoint Group Using NINTEX Workflow 

0 Kudos
Reply