Flow Designer approval based on location

Sagar Garige
Tera Contributor

Hi Experts,

We have a requirement to get approvals based on the location selected on the form. We have two variables "Moving From" and "Moving To" Both are reference variables to the "cmn_location" table. So, based on the location selected in these two fields, we need two group approvals from the location table (primary support field on loction table referencing group tabel) simultaneously.

Conditions to check:

1. If any of the locations selected has no "primary support" group, default approval to the service desk.

2. If both "Moving from" and "Moving to" has same "Primary group" then only one group approval required.

3. If "Moving from" and "Moving to" have two different groups, then two group approvals simultaneously anyone from each group should approve.

I searched in the community, but no luck. This is a priority one so quick reply is highly appriciated.

3 ACCEPTED SOLUTIONS

Viraj Hudlikar
Giga Sage

Hello @Sagar Garige 

You can do it with flow try to give a start. Below is pseudo format for your flow while designing. If stuck or block do share with us will try to guide you. 

Start
│
├─ Retrieve "Moving From" primary support group (MF_Group)
├─ Retrieve "Moving To" primary support group (MT_Group)
│
├─ Check if MF_Group OR MT_Group is NULL
│  │
│  ├─ Yes → Set Approval Group = Service Desk
│  │
│  └─ No → Check if MF_Group == MT_Group
│     │
│     ├─ Yes → Set Approval Group = MF_Group
│     │
│     └─ No → Set Approval Groups = MF_Group & MT_Group (both required)
│
└─ Submit for Approval 
   │
   └─ Wait for Approval(s)
      │
      └─ Proceed based on outcome (Approved/Rejected)

 

If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.

 

Thanks & Regards
Viraj Hudlikar.

View solution in original post

@Sagar Garige 

You will have to use multiple IF logic in flow for your 3 checks.

OR
Another way is to use Flow variable and use scripting and store the approval group in flow variable and then use that in Ask for Approval flow action

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

Hi @Sagar Garige 

 

So yon can accept all answers and close the thead.

*************************************************************************************************************
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]

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

View solution in original post

10 REPLIES 10

Sagar Garige
Tera Contributor

Firstly, I really appreciate your quick response to my question.

 

I have added 1st condition in Flow as follows:
1. If > Moving From > location > Primary Support > (is Empty) OR

        Moving to > location > Primary support > (is Empty)

then >> Ask for Approval (SD Group).

Now i'm struck at 2nd condition to check if both has same group? and shoud i use if here in 2nd condition or If else?

 

I really appreciate your quick response.

@Sagar Garige 

You will have to use multiple IF logic in flow for your 3 checks.

OR
Another way is to use Flow variable and use scripting and store the approval group in flow variable and then use that in Ask for Approval flow action

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@Sagar Garige 

Thank you for marking my response as helpful.

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

For second one same stuff dot walk and if condition to compare the group 

variable1.location.SG is same as varibale2.location.SG

*************************************************************************************************************
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]

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

Sagar Garige
Tera Contributor

Thank you all for taking time to help me out. I have tried all your solutions combined and could achieve the requirement.