Flow Designer - If Condition (Group)

Lloyd700
Tera Contributor

This is my first post, so hopefully this is the right area!

 

I have created a group under "System Security" -> "Users & Groups" -> "Groups", and I have added a user into the group.  I am working on a flow within Flow Designer.  I'm trying to add an "If" condition based on the group that was created.  However, I can't find a way to specify the group.

 

In an "Ask For Approval" action, I'm able to add the group there via the, "Add Group" button.

 

I feel like I'm making this way harder than it needs to be, but I can't figure out how to do an "If" logic based on a group.  Can someone help me out?

1 ACCEPTED SOLUTION

Clara Lemos
Mega Sage
Mega Sage

Hi @Lloyd700 ,

 

Are you trying to verify if the requestor is a member of the group?

If yes, then you need to use a 'Look Up Record' in the 'sys_user_grmember' table with the condition that the User is the requestor and the group is your group. After that add a if condition to verify if the look up was successful , if it was the user is a member of the group , and if not he isn't.

 

In this post you can see an example on how it was done : Solved: Look up records and use it to check whether a user... - ServiceNow Community

 

If that helps please mark my answer as correct / helpful!
And if further help is needed please let me know

Cheers

View solution in original post

8 REPLIES 8

Clara Lemos
Mega Sage
Mega Sage

Hi @Lloyd700 ,

 

Are you trying to verify if the requestor is a member of the group?

If yes, then you need to use a 'Look Up Record' in the 'sys_user_grmember' table with the condition that the User is the requestor and the group is your group. After that add a if condition to verify if the look up was successful , if it was the user is a member of the group , and if not he isn't.

 

In this post you can see an example on how it was done : Solved: Look up records and use it to check whether a user... - ServiceNow Community

 

If that helps please mark my answer as correct / helpful!
And if further help is needed please let me know

Cheers

Hey @Clara Lemos !

 

I would say the answer is, kinda?  What I'm trying to accomplish is to bypass the first level of approval, if the requestor is a member of a group.  Some of the people that may fill out the form are also the first approval level, and it seems silly to make them go in and approve something they just submitted.  But obviously, if someone else fills out the form, then I want the first approval level to get it.

 

It looks like I may be able to use that link you sent to look up and verify, then proceed accordingly.  I'm going tinker and see.

HI @Lloyd700 

 

I will say, instead of bypassing the approval , better put condition that requestor cant approve its own request bcz 4 eyes is better than bypass.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hello @Dr Atul G- LNG 

 

The main reason I'm not too worried about bypassing that first approval is, there are 2 more levels of approval after that.  I definitely would not be bypassing if it were only that single level!