Newbie questions about hiding and showing group when database is empty

Hi there,

How do I show a group if a datatype is empty and hide when it’s not.

For example, I have a data type called “Strategy”, it consists of various fields of text and numbers. I want to show a group that just says “you have no strategy added” when the database has no entry for this datatype.

I set the condition on the group (that I want to show) to" “Parent Group’s strategy is empty” this is element is visible.

However, the group won’t hide when the Strategy data type is not empty. What am I doing wrong here?

Thanks in advance.

Set the group to not be displayed on page load. Then add another conditional to show the group ( make visible ) when the data is not empty…so you’d have two conditionals, one to show, one to hide and the default is the element is hidden

By default repeating groups collapse by themselves if you have extended vertical scrolling.

That is true, but you need to keep in mind it doesn’t actually make the repeating group not visible. So, if you have any borders they could be seen. Also, even if there are no borders, the repeating group is visible and taking up space so margins etc. can’t be maintained nearly as easily if you were to make the repeating group not visible.

Also, to answer the question about how to make groups not visible, setting up conditionals is the way to do it, which can also be applied to repeating groups and any other type of element.

Welcome @hello.plannwin!

If you put the RG into a group, that group can be collapsed when hidden (if strategy is empty), which will collapse the RG. This works best when the RG data is based on the data defining the group being collapsed, as Bubble will call the data only when visible, not page loaded.

Thanks all for your quick responses.

The group that I am using is a normal group that contains a text element and a button. It’s not a repeating group. The purpose of this group is just to display a message when the database is empty.

My settings are:


group no strategy -conditional

The issue is the group won’t hide if there’s an entry in the database for Strategy.

Did you solve the issue? You should target your repeating group to hide this group.

When repeating group Strategy:count < 1

yeah sorted thank you.