Uncheck all other checkboxes when row is checked

I have a repeater widget that has a checbox inside each row.
When I click a row’s checkbox I wish for all other checkboxes to deselect, except this row.
I can’t figure out how to do it. It seems simple, but it’s not! Can anyone help?

Example repeater with checboxes below:
checbox-example-1.rp (134.4 KB)

You can do this far more simply without using a repeater if you use selection groups, assuming I have correctly understood what you are trying to do.

I would typically use selection groups, but in this instance it needs to be inside the repeater because it also needs to be able update rows, delete rows ect.

I see - you would need to do something like the following:

  • Include a column in your repeater to track whether the checkbox is checked
  • On row item load, check whether this is true and check the checkbox if it is
  • On check of checkbox, update all rows to ‘not checked’ (refreshes the whole table)
  • THEN, update ‘This’ row (refreshes the whole table again) to checked.

There may be a more elegant way to do this, but I’m not sure how.

Is there any chance you could show me how to do this in an example? I’m not sure how to load a row or refresh the table?

Hi there - here’s a sample file. I made one from scratch as your demo file had some dynamic panels in it that I didn’t want to mess with.

CheckboxDemo.rp (53.7 KB)

This does the following:

  • When you check a checkbox in any row, it marks all rows, then unmarks the row you just selected
  • It then updates all marked rows to ‘No’ for the column ‘Checked’
  • This reloads the repeater and unchecks all checked rows, excluding the one you just changed

The logic to detect whether a row is checked or not is on the repeater itself.

If you’re not overly familiar with repeaters, I really recommend this tutorial.

This video series is also a really great overall introduction.

1 Like

I recently has this same problem. Have you tried UNchecking the “Isolate Selection Groups” checkbox on the repeater? It’s in the 3-dots menu next to the repeater name. Uncheck that, then try adding your checkbox to a selection group.

1 Like

Thanks for all your help with this. The solution worked perfectly!!! I’ll spend some more time with the tutorials as well.

You’re welcome :slight_smile:

I had the exact same issue and unchecking Isolate Selection Groups worked, cheers!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.