- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2025 10:01 AM
I am working on a personal project and I want to make checklists mandatory for a specific task. I checked some discussions in the community and came across a reply teaching a way to do it. (Solved: Checklist - Able to Make Mandatory and Able to App... - ServiceNow Community). But this method only let the record be updated in any way if all the boxes are checked off.
I want a way to make the all check boxes to be checked off as mandatory, I want to be able to check off the box that was completed and update the task, rather than having it say all check boxes need to be checked off before updating. So basically the end goal is to still be able to update the task and check off the items that are completed, but make it mandatory all boxes are checked off before closing the task.
Any advice on how to accomplish this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2025 10:15 AM
Hi @João V Freitas ,
create a Before update BR on your table
with condition like (state changes to closed) or (active Changes to False)
whatever is meaningful
with script
(function executeRule(current, previous /*null when async*/ ) {
var gr = new GlideRecord("checklist_item");
gr.addEncodedQuery('complete=false^checklist.document=' + current.getValue('sys_id'));
gr.query();
if (gr.hasNext()) {
gs.addErrorMessage('close the active check lists');
current.setAbortAction(true);
}
})(current, previous);
I have taken problem table as an example but update it with you table name and add condition with above script
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2025 10:15 AM
Hi @João V Freitas ,
create a Before update BR on your table
with condition like (state changes to closed) or (active Changes to False)
whatever is meaningful
with script
(function executeRule(current, previous /*null when async*/ ) {
var gr = new GlideRecord("checklist_item");
gr.addEncodedQuery('complete=false^checklist.document=' + current.getValue('sys_id'));
gr.query();
if (gr.hasNext()) {
gs.addErrorMessage('close the active check lists');
current.setAbortAction(true);
}
})(current, previous);
I have taken problem table as an example but update it with you table name and add condition with above script
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2025 12:05 PM
Hello @Chaitanya ILCR ,
That's it! This solved my issue. I already did a validation via client script to stop the submission when the state was changing to closed complete and not all checklist itens were checked off, but stuff like UI actions and even extensions that allow me to edit field values were overriding it.
Your method solved it perfectly, thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2025 10:35 AM
Hello @João V Freitas
If you are trying to achieve something like this
Variables configuration setup:
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2025 12:12 PM
Hi Juhi,
I was refering to checklist formatters on task tables rather than the checkbox T/F variable.
But thanks for the reply!