Sharepoint 2013 LookupSPGroupMembers Workflow Activity

I created  a custom workflow activity that writes to history list all users from a specific group.

In this post I will not explain step by step the details to create a custom activity, you can see that in  (

I’ll be focused on the detail to iterate through group members Dynamic Value result.

My Custom Avctivity is:


I’ll explain now the details of the principal activities.

We need a LookupSPGroupMembers activity that will put the result in a local variable GroupMembers, of type DynamicValue:


This DynamicValue is an  array of DynamicValues, so I”ll get the number of returned elements , I need 2 activities for that (GetDynamicValueProperty, and CountDynamicValueItems from the variable properties).



Next, I need to iterate through the variable GroupMembers to get the loginNames:


I log to HistoryList each LoginName:


The result is:




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: