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

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Sagar Garige 

Yes, it is doable.

You need to retrieve the catalog variables in the flow and then use dot-walking to check if the 'Location → Support Group' field is empty. If it is, assign the 'SD Group'; otherwise, use the main group.

I recommend starting the flow, and let us know where you get stuck.

In the flow, the required actions are:

  1. Get  catalog variables
  2. Use an 'If' condition with dot-walking
  3. Ask for approval 
*************************************************************************************************************
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]

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

Ankur Bawiskar
Tera Patron
Tera Patron

@Sagar Garige 

best way to handle this

1) Use "Get Catalog Variables" flow action and get those 2 variables

2) use IF else logic in flow and then send the approval

Where are you stuck?

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

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.

Hello @Sagar Garige 

If you have seen my format, first check the value compare and set group value in flow variable and then use in last for triggering approval not at very first instance.

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.