Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to uncheck the list after refresh

Jyotshna_M
ServiceNow Employee
ServiceNow Employee

I have the following List action which refresh the list on click

function onClick() {
var selected = g_list.getChecked();
console.log("first " + selected);

setTimeout(function() {
g_list.refresh();
console.log("second " + g_list.getChecked());
}, 1000);
}


Even after refresh , getChecked() still returns the list of sysid's which were selected before refresh.
How do we uncheck this in the backend?
1 REPLY 1

Community Alums
Not applicable

Hi @Jyotshna_M ,

Just update this line of code:

 
g_list.refresh(1);