I have a setup like the one shown below in a dashboard.
On clicking each of the buttons in the top menu, the corresponding columns can be hidden or made visible.
The buttons(shapes) change color to grey when column is hidden and blue when it is visible.
What I am trying to do now is to enable hiding of the entire section when the title of the section in the top menu is clicked e.g. when Revenue is clicked the entire revenue section in the table below will be hidden but where I'm stuck is how to get all buttons in that section to change color to grey when the title is clicked.
e.g. in the below screen show, all the buttons under Revenue should have been grey.
Because of how all my shapes are grouped (multiple levels), I am not able to select all the shapes based on group names so need some way to select all shapes based on the starting part of their names and change the shapes colors based on that.
Note: I need kind of a reusable procedure to do this as I have a number of such menu items. What I have shown and provided in the sample excel is just a sample.
On clicking each of the buttons in the top menu, the corresponding columns can be hidden or made visible.

The buttons(shapes) change color to grey when column is hidden and blue when it is visible.
What I am trying to do now is to enable hiding of the entire section when the title of the section in the top menu is clicked e.g. when Revenue is clicked the entire revenue section in the table below will be hidden but where I'm stuck is how to get all buttons in that section to change color to grey when the title is clicked.
e.g. in the below screen show, all the buttons under Revenue should have been grey.

Because of how all my shapes are grouped (multiple levels), I am not able to select all the shapes based on group names so need some way to select all shapes based on the starting part of their names and change the shapes colors based on that.
Note: I need kind of a reusable procedure to do this as I have a number of such menu items. What I have shown and provided in the sample excel is just a sample.