0

I´m trying to collect Group ID to use it in Assigned to field... I´m using VS 2015 and SP 2013, I´ve a Owner column in my list. here u can see my workflow enter image description here

enter image description here

enter image description here

enter image description here what I miss?? or what I need to Change??

7
  • Have you tried using the group's name instead?
    – Submits
    Jun 21 '16 at 12:36
  • Yes and it's work fine but i dont need to hardcoding groups...when I create an item in the list and select a group would workflow identify which group it is and send Emil Jun 21 '16 at 12:45
  • You mean you want the workflow to identify which group the current user belongs to and send the group an email? What if they belong to more than one group?
    – Submits
    Jun 21 '16 at 13:44
  • no, I mean to identify the group based on what user set for group in the owner column and then send Email to this group Jun 22 '16 at 7:43
  • In your GetDynamicValueProperties activity, are you taking the value of the of the Owner column? Can you share the screenshot for the properties of the GetDynamicValueProperties?
    – Submits
    Jun 22 '16 at 8:04
1

My guess would be that the Assigned to field won't accept the user group's ID and would need another property. So I would suggest this:

  • After the GetDynamicValueProperties activity, add a LookupSPGroup activity
  • In the Properties of this activity in the GroupPrincipalId property add your OwnerId variable. Set the result property to any variable of your choice (it should be of DynamicValue data type)
  • Now on the LookupSPGroup activity click the Get Properties link, which will automatically add another GetDynamicValueProperties activity. In this activity, in the Path column, try a different property, which you will then need to use in the Assigned to field. Try LoginName or Title or one of the other properties
  • If none of these properties work try using the Users property, which will return an SPUserCollection. Then go through these users and add their Login Names to the Assigned to field individually
  • The other alternative that I can think of is to use the HTTPSend activity to make a REST call to this end point: http://yoursiteurl/_api/web/sitegroups(yourgroupid)/users. This will return a collection of users which, again, you could take the IDs or Login Names from and try entering these into your Assigned to field

I hope this sets you on the correct path.

4
  • Great :) Just out of curiosity, which property worked for you?
    – Submits
    Jun 22 '16 at 12:22
  • the first one with LookupSPGroup Jun 23 '16 at 7:07
  • Which property? LoginName, Title?
    – Submits
    Jun 23 '16 at 7:48
  • Title property! Jun 23 '16 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.