How to get group name from user approval activity

Derek10
Tera Expert

I have a setup with a user activity based from a list collector. User selects group from a slushbucket and then the approvers are generated from the manager of those groups

My question is this, I need to find a way to get ONLY the approved groups back, I have posted before prior and the function works with group approval activity, but I have to use user, as I can't use the (member of) for group approval, it has to be the group manager, hence why I had to switch it to user approval instead of group approval.

But I am unable to find the link after approval to go back and get the group name that was approved.

Any ideas?

6 REPLIES 6

Brad Tilton
ServiceNow Employee
ServiceNow Employee

The approval - user activity doesn't store the group name anywhere, so I don't think you can retrieve it from there like you could the group activity. Could you just go back to the list collector variable you're using to generate the group in the first place and use that?


I could if I didn't have to just pull the approved ones.



The other alternative method is that I copy the group approval and modify the work definition of the copy, but I'm REALLLY trying to avoid that.



I can't use the group approval because inherently   the approvals are for the member of, which in this case it cannot be as it has to be the manager of.




My third option -


Would be to set it up as a group inherently and use the built in and not ldap the   members in from AD, but I want to use that as a check for the logic so I really want to avoid this route.



The problem with directly pulling the groups from the list collector is that it doesn't know what are approved or not.


We ended up going back to the group activity and with some indepth coding on the advanced scripting, we were able to pull this off.


Would you mind sharing your coding? This sounds like a very cool concept that may be of use to us.