workflow approvals should create
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
There is a catalog item and in that there are 2 fields one is "group name" referring to group table and another one is radio buttons field (select_action) conatins 4 options
if "select_action" variable selected "update approval deputies" or "update mailbox" then approval should goes to selected group manager.
if "select action" variable selectes "deactivate a group" or "other" then two approvals should create
1. group manager approval and second approval is "L2 group approval"
if group does not have manager then the entore request should be cancelled.
how can i achieve this in workflow.
(backened names )
if (axa_sesd_select_action_var = Update approval deputies OR Update Mailbox)
then only group manager approval (the group selected in the above field)
if(axa_sesd_select_action_var = Desactivate a group OR Other)
then 2 approvals should trigger
one is selected group manager approval and second one is default group (L2 group)
if selected group does not have manager then request should be cancelled.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
20m ago
it's an easy requirement.
what did you start with and where are you stuck?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4m ago
HI @Ankur Bawiskar ,
I have written a approver user script but no approvals are triggering
answer = [];
var groupName = current.variables.axa_sesd_group_name_var;
var grp = new GlideRecord('sys_user_group');
if (grp.get(groupName)) {
if (!grp.manager) {
current.state = 4;
current.work_notes = "Selected group has no manager.";
current.update();
answer = [];
return;
}
answer.push(grp.manager.toString());
var action = current.variables.axa_sesd_select_action_var + '';
if (action == 'Desactivate a group' || action == 'Other') {
// L2 approver user sys_id
answer.push('981c4bbd87b0c6908530fd99cebb35e6');
}
}
please suggest what is wrong here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3m ago
Hi @sinu2 ,
Are you using a flow designer flow or a workflow? , we would recommend to you use flow and below is the high level flow logic.
Hope it helps!
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025,2026
