How to set variable checkbox true in RITM (checklist)

Sarah Anjos
Tera Contributor

Hi,
I have some RITMs that open automatically for service desk analysts to check meeting room equipment. This checklist is opened with some checkbox variables, as there are many options, the analyst requested the creation of a button or variable with the name of "Checklist ok" and when clicking, all other variables in the list must be set to true. But even doing it by client script or business rule does not work. can you help me?

find_real_file.png

If the analyst clicks on checklist ok, all previous checkbox variables should be set to "true", it didn't work with OnChange client script.

1 ACCEPTED SOLUTION

Kartik Sethi
Tera Guru
Tera Guru

Hi @Sarah Anjos 

You can create an onChange Catalog Client Script, that should observe your "Checklist OK" checkbox changes and it should have "Applies to Requested Item" checked:

find_real_file.png

In this Catalog Client Script, you can add the below-provided code:

var checkListAllFields = ['checkbox_1', 'checkbox_2', 'checkbox_3', ....];
for (var i = 0; i < checkListAllFields.length; i++) {
    //Below line will set all checkboxes to true if Checklist Ok is true
    //If False then all will be set to false
    g_form.setValue(checkListAllFields[i], newValue);
}

 


Please mark my answer as correct if this solves your issues!

If it helped you in any way then please mark helpful!

 

Thanks and regards,

Kartik

View solution in original post

6 REPLIES 6

It worked, thank you very much Kartik!

 

Hi @Sarah Anjos 

Thank you for marking my answer as correct!

Always happy to help!!

 

Thanks and regards,

Kartik