Want to take Group manager approval using script in workflow for a request Item where group is a field in catalog item.

Shikha puri
Tera Contributor

Want to take Group manager approval using script in workflow for a request Item where group is a field in catalog item.

1 ACCEPTED SOLUTION

you want user approval or group approval?

In your question you said group manager approval -> so I mentioned user approval activity and script

if you want group approval then use Group Approval Activity with script

answer = [];

answer.push(current.variables.groupVariableName.toString());

Regards
Ankur

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

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

group is a field on catalog item or a variable on RITM?

you can use User Approval Activity and do this if you know group field and it points to sys_user_group table

answer = [];

answer.push(current.cat_item.groupField.manager.toString());

Regards
Ankur

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

HI Ankur,

 

Group is a variable for that catalog item.

find_real_file.png

then do this in the user approval activity script

answer = [];

answer.push(current.variables.variableName.manager.toString());

Regards
Ankur

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

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

without script you can select the field from the tree icon

Example:

Dot walk to Item -> Fulfillment Group -> Manager

find_real_file.png

Regards
Ankur

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