Workflow to get membership of multiple groups

I'd like to create a workflow that starts when a member is removed from any group with an admincount of 1.

The reason for this is I want to check if the removed member is a member of any other groups with an admincount of 1, if the member isn't I need to update the admincount to 0 on the user account.

I know how to configure the initial workflow to detect the changes, but I cannot work out how I check the memberOf field against multiple groups without doing a lot of copy/paste for each group.  I'd prefer not to manually add the groups as our groups get updated with admincount on a regular basis so I need a way to find all the groups and check the membership accordingly.

I can do this easily in code but I cannot get my head around how to do this in a workflow.  Any suggestions would be much appreciated.

I must admit, I find it considerably easier to write scripts and use the workflows to trigger them but I'm not sure if that's going to cause me issues elsewhere in the future, so I'm trying to use the workflow logic.

Parents Reply Children
No Data