Task need to be generated if no approver details present in the table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 02:39 AM
Hi Community,
I have a requirement, there is table (approver table) and in that table 2 fields environment name and approver....in workflow if there is no approver/missing/approver is inactive for any of the record in the table then task need to be generated to x team....how can we achieve this
Can you let me know how to check if approver is present in the table or not
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 11:53 AM
HI @Dr Atul G- LNG ,
Thank for your reply,
But can you please let me know how we can achieve this in workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 12:23 PM
Hi @suuriya
Workflow will be tough here, as need to write script. Try with flow.
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-26-2024 12:28 PM
Hi @Dr Atul G- LNG ,
Thanks for your suggestion but I'm adding this requirement in the existing workflow that we have
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 11:54 AM - edited 02-26-2024 11:55 AM
Hi @suuriya ,
Configure If workflow activity and query approver table and get values of name and field . And in if activity add the conditions like if name is empty (or) approver active is false then return yes (or) no.
var formsme = current.variables.form_sme.sys_id;//to get the values of the field
If it is return yes then add Create Task activity (or) you can add the Run Script activity, in that activity add script to genearte Tasks with required assignment group.
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2024 01:46 AM
HI @Sumanth16 ,
Thanks for the reply
In workflow i have written a script in if activity even tho the approver field is empty in mentioned table is not going for yes condition it is going to no condition
while submitting the request i select the last record which doesn't have approver details but still it is following no path
Can you please let me know what need to be corrected? in script