Parent Group visibility based on Children visibility circular logic problem

I have a collapsible group which should be visible only if either one of the included buttons are visible. if all of them are invisible (Following their visibility conditions), the group hides (and collapses).

Telling bubble to not-visible the parent group if all included buttons are invisible, will not work, because its a circular logic, because child visibility will in turn depend on parent which is depended on child…

So whats a better way?

It’s tough to tell without seeing your app, but it sounds like you could do this with a custom state.

When the page loads, set a custom boolean state for each button using the same logic you were using to set their visibility, let’s call that state “isVisible”:

When Page Loads:
Set State of Button A:
State: isVisible = “yes”
Only when (insert criteria here)
Set State of Button B:
State: isVisible = “yes”
Only when (insert criteria here)

Then, on the parent element, set a conditional statement checking the “isVisible” state of each button:

Something to the effect of
If Button A’s isVisible = “yes” OR Button B’s isVisible = “yes”:
then this element is visible.

Again, tough to tell without a link to the editor, but that’s a start.

Worked beautiful! thanks

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.