Is there a way to iterate through every row in the table and change the value of boolean based on condition on click of button

Please, learn this method and adapt it to your needs