Showing results for 
Search instead for 
Did you mean: 
Nintex Newbie

Query list based on a SharePoint group

Jump to solution

I have a task list which can assign tasks to either users or SharePoint groups and i am trying to create a site workflow that will run once a week to send an email to each of the distict users or groups detailing all of their outstanding tasks.

I can query successfully if the assigned to field is marked as an individual user by using the user ID but i cannot get the query list to return anything if the Assigned To  SharePoint Group.

For Clarification

Workflow Section

This is the issue where the issue is occurring.

Query List Filter

When applying the person or group to perAssignedTo then nothing is returned,  when applying the ID to perAssignedTo then only user details are returned but no record with a group in Assigned To is returned.

Thanks In Advance.

Tags (1)
0 Kudos
1 Reply
Nintex Newbie

Re: Query list based on a SharePoint group

Jump to solution

Ok I have managed to solve this.

1. In the Query List change it to CAML View and update the Lookup to the following (changing User to int and Ensuring LookupId="TRUE")

        <FieldRef Name="AssignedTo" LookupId="TRUE" />
        <Value Type="int">{WorkflowVariable:idPerson}</Value>

2. Grab the ID from the Web Service UserGroup.GetGroupCollection by supplying the groupname in an XML file and parsing the XML for ID and storing this in the idPerson workflow variable.

The input XML i generated with a Build String component

<Group GroupName="{WorkflowVariable:perAssignedTo}"/>

I only do this when the returned userID is equal to -1

The overall portion of the flow to get the id of the user or group now becomes the following.

Get Group ID from Web Service

There is probably a much easier way of getting the group ID but this is working for me.

View solution in original post