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.
This is the issue where the issue is occurring.
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.
Solved! Go 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" />
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
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.
There is probably a much easier way of getting the group ID but this is working for me.