Check a checkbox based on the condition of other checkbox
Hi folks,
I have a column with checkboxes.
Some of the checkboxes are set by a if condition selecting data inside the row where the checkbox is located using @row. This works perfectly as it should.
But I also need a way to check a checkbox depending on the condition of the checkboxes in the rows after this checkbox.
Something like "If a checkbox in row 31,32,33,... is set, then check the checkbox in row 30".
It would also suffice if something like "If checkbox in row 31 is set, then check checkbox in row 30, too" would work.
I have already done some experimenting with various if-clauses - some with a simple check if the value of the checkbox in question is <>"" or some if clauses with the ISBLANK or ISNOTBLANK conditions. But the best thing I managed was, that the checkbox was set one time to the correct value and if the corresponding box changed, the condition wasn't changed to the correct state.
I would assume this isn't possible, because the conditions are only verified on load, but the other if-clauses work like charm and even saving and reloading the sheet doesn't change the value of the checkbox in question.
Can someone please shed some light on this?
Thanks!
Best Answer
-
Since you are using hierarchy, we can use something along the lines of
=IF(COUNTIFS(DESCENDANTS(), @cell = 1)> 0, 1)
Answers
-
Are you able to provide some screenshots for context?
-
Sure.
This is part of our blueprint used to roll out our projects. The blueprint consists of several sheets, which have linked cells between them, and are rolled out via the control center.
The checkboxes at row 74,79 and 85 (2) are set via if clauses referring to values in the same row (which are filled via a form, which probably doesn't matter in this case).
I'd like to check the box in row 73 (1) depending on if any of the other checkboxes (2) are set.
As I said before, I managed to set the box at (1) as a "one timer", but it doesn't change state if the condition isn't met anymore.
-
Since you are using hierarchy, we can use something along the lines of
=IF(COUNTIFS(DESCENDANTS(), @cell = 1)> 0, 1)
-
Thanks a lot - again.
This is a really elegant solution to the problem!
I realize once again that I still have a long way to go with SmartSheet.
-
Happy to help. 👍️
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.4K Get Help
- 424 Global Discussions
- 221 Industry Talk
- 463 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 144 Just for fun
- 59 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives