- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2022 06:19 AM
hello ,
I have a requirement that catalog task should be closed complete when the variable "Approve" is set to yes and Planned Date is not empty . If this 2 value are set in the variable then the catalog task should be set to closed complete.
Thanks and Regards,
Sheetal
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2022 06:42 AM
Hi sheetal
can you share what did you try so far?
you can try a before update BR with conditions as state || changes to || closed complete.
in your BR Code, use below logic
modify variable names and values accordingly.
if(current.variables.approve != 'yes' && current.variables.pllaned_date != '' )
{
gs.addErrorMessage("Cannot close CTASK");
current.setAbortAction(true);
}
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2022 06:42 AM
Hi sheetal
can you share what did you try so far?
you can try a before update BR with conditions as state || changes to || closed complete.
in your BR Code, use below logic
modify variable names and values accordingly.
if(current.variables.approve != 'yes' && current.variables.pllaned_date != '' )
{
gs.addErrorMessage("Cannot close CTASK");
current.setAbortAction(true);
}
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2022 06:44 AM
Hi,
You can control in workflow. You can achieve with the help of
if(current.variables.variable_name == 'Yes'){
task.state = 'Closed Complete State Number';
}
Regards,
Suresh.
Suresh.