How to build conditional logic in Flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2025 06:37 AM
Hello All,
I am trying to configure the below logic in flow designer and need some help. Please advise.
I have a variable called "Productive Date" on a record producer.
1. If the Productive Date <= 30 days from current date (If today is Feb 21 it means Productive Date selected is on or before March 23, 2025), then record should be assigned to Group A.
2. If the productive date >30 days from current date (after Mar 23, 2025), then record should be assigned to Group B. However when it reaches 30 day mark, flow should assign the case back to Group A automatically.
Please advise how we can incorporate this logic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2025 08:59 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2025 06:54 AM
Hi @dvelloriy
You can retrieve the variables and then compare them. Did you notice any operations like "relative" or "less than" when you set the date as a condition?
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]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2025 07:18 AM
Hi AG,
I was able to retrieve the variable (type = date). However i dont see any conditional logic when using If statement to compare it with current date. I think we can create a custom action to retrieve current glide date and then use it in our if logic however just checking if there is any other recommended way like the one described by Ankur above. If the Productive date is > 30 days from current date, then idea is to check the effective date on daily basis, once we hit the 30 day mark it should auto route to group A.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2025 07:36 AM
Hi @dvelloriy
My only point is to go without a script but I guess here Ankur's view is right to proceed.
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]
****************************************************************************************************************