aam82 Posted March 31, 2016 Report Share Posted March 31, 2016 The script below can be inserted into a footer. It preselects all rows with a value greater than 1, so that they can be Bulk Edited. It loops for a field in a tabular datapage with a class of cbResultSetTableCellNumberDate, and then it looks for the value of the text of those cells that match. On my datapage, I have just 1 column with numerical data, so I don't need a more specific selector than that... Then, it jumps up to the Row of the matching cell, then down to the first element in the Row (the cell that holds the checkbox), then down again to the checkbox itself, then uses a click event to check the box. To make use of Bulk Edit, a click event must be used, and not document.getElementById("checkbox").checked = true; because Bulk Edit is grayed out until there is a click (not a change) event. <script type="text/javascript"> var elems = document.querySelectorAll(".cbResultSetTableCellNumberDate"); for (var i=0, m=elems.length; i<m; i++) { if (elems.innerText >= 1) { elems.parentNode.firstChild.firstChild.click(); } } </script> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.