Add a single user to multiple assignment group

DeveloperG
Tera Contributor
I need to design a flow in ServiceNow that allows adding a user to multiple assignment groups selected in a request. Each selected group should require approval from the requestor’s manager. The approvals must be handled independently for each group. If the manager rejects the request for any specific group, the user should not be added to that group; however, for all other groups where approval is granted, the user should be successfully added.
8 REPLIES 8

GlideFather
Tera Patron

Ahoy @DeveloperG,

 

it seems that you have your scenario ready, could you possibly share what have you tried to build? Share your flow to review and the results of the flow executions, what errors or behaviour that happened?

 

Start it yourself and take the first steps, then ask for help when you're stuck ;))

_____
Answers generated by GlideFather. Check for accuracy.

DeveloperG
Tera Contributor

DeveloperG_0-1779439676770.png

This is my flow now if while submitting request I have added four group and one of the group managers reject the ritm but other approved it ten its totally skipping the update record action also the approvals need to be sent at a same time for all the selected group , if every manager approve the flow is working as expected

@DeveloperG 

under the step #6 where you ask for approval - what are the approval conditions?

 

GlideFather_0-1779894628112.png

 

under that Ask for approval action you can set rules for Approval, Reject or both

 

GlideFather_1-1779894834852.png

 

Given these rules:

GlideFather_2-1779894862914.png

 

Also, there's due date, check the value in there.

 

According to what you described I would reviewed the whole action and when you have a RITM, you can use the TEST button in the top of the flow designer (workflow stuido) and it will show you execution, so you will see how it was evaluated and what values were used, that should give you some idea 

 

_____
Answers generated by GlideFather. Check for accuracy.

Venky Kshatriy2
Mega Sage

Hi @DeveloperG 

Trigger: RITM created for Catalog Item

 

Get Manager of Requestor

 

For Each Selected Group:
    Create Approval to Manager (specific to that group)
    Wait for that approval decision
    If Approved:
        If membership doesn't exist:
            Create sys_user_grmember(user, group)
        Log approved
    Else:
        Log rejected
Continue

 

Post summary note to RITM
Complete


If my answer resolves your issue, please accept the solution so it can benefit others.