I need a Lookup to populate a checkbox in a table. Since checkboxes aren't available as Lookup targets, I've added a number field to the table to populate instead (with 1/0). I'm struggling on the JavaScript to check the boxes based on the value in the number field.
I assume there's a way to iterate through the table rows, but I haven't been able to find the syntax. Unless there's some way to compare all the values and set the checkboxes at once, using some sort of set/collection based logic?
I'm expecting something like this:
$('.LookupTrigger input').change(function() { $(document).on("onloadlookupfinished", function () { for each row in .MyTable { if ($('.NumberField input').val() == 1) { $('.Checkbox input').prop('checked',true); } } }); });