Skip to main content
Nintex Community Menu Bar

Auto-check Multi-Selection Checkbox (List-Lookup)

  • May 3, 2017
  • 1 reply
  • 6 views

Forum|alt.badge.img+1

Hi, Guys.

Need help, i have a Multiple-Selection Checkbox (List-Lookup) that i want to check on change of a dropdown.

Can anyone share some javascript code? Thank you.

Control Settings - List Lookup

Display format - Check boxes (Multiple-Selection)

sample values: [3;#Test1,5;#Test2,6;#Test3,8;#Test4,9;#Test5]

i tried these below but no luck

NWF$('#' + chkVal).find('input[value='3;#Test1']').prop("checked", "checked");

NWF$('#' + chkVal).find(':checkbox[value='3;#Test1']').attr("checked", "checked");

NWF$('#' + chkVal).find('input[value='Test1']').prop("checked", "checked");

NWF$('#' + chkVal).find(':checkbox[value='Test1']').attr("checked", "checked");

1 reply

Forum|alt.badge.img+14
  • Scholar
  • May 3, 2017

you haven't specified how exactly do you need or are able to identify single options, but if possible I'd suggest not to rely on text labels but rather on IDs, since labels might be often subject of change.

to set lookup's checkboxes checked something like this should work

NWF$('#' + chkVal).closest(".nf-filler-control").find("[type='checkbox'][value='4'],[value='3'],[value='2']").prop('checked','checked')

this will set checked checkboxes related to lookup IDs = 2, 3, 4