Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Approval Groups in Workflow

sam352120
Kilo Guru

Dear Experts,

 

We have a requirement to find out the In which workflows specific groups are used as approvals. Is there any 

short cut to find out the details of the groups in ServiceNow?

4 REPLIES 4

Alp Utku
Mega Sage

You can go to Groups and filter as Group Type = Approval

Chaitanya ILCR
Mega Patron

HI @sam352120 ,

 

sys_variable_value is the table where you search

go to the table =sys_variable_value

and add a filter value contains sys_id of the group or the name of the group

ChaitanyaILCR_0-1763464550216.png

 

if you group is stored in a property also check for value contains name of of the property 

you will be able to find the activities and if you open the activity (ID field) that record will have information of the workflow

 

ChaitanyaILCR_1-1763464690327.png

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

Nawal Singh
Tera Guru

Hi @sam352120 ,

you can also run the below script in Background script and it will return workflow name -

var groupId = 'c1921b5a1bc0a6d0598d748bd34bcb17';

var gr = new GlideRecord('wf_activity');
gr.addQuery('activity_definition.name', 'Approval - Group');
gr.addQuery('approval_group', groupId);
gr.query();

while (gr.next()) {
    gs.print(
        "Workflow: " + gr.workflow_version.name +
        " | Activity: " + gr.name +
        " | Version: " + gr.workflow_version
    );
}

 

If you found my response helpful, please mark it as helpful and accept it as the solution.

Thank you
Nawal Singh

Ankur Bawiskar
Tera Patron
Tera Patron

@sam352120 

this article from Mark has all the details on how to know a particular sysid is used where in workflow

Finding references / sys_ids in Workflows 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader