Current cells index is 1 problem

Hello, I think I may be overcomplicating this however I was wondering if anyone knew a solution to displaying a group inside of a repeating group when that repeating group is empty.

To give some context, I have a header bar (inside the RG) that has a condition “When current cells index is 1 - this element is visible” so users can navigate between different repeating groups, however if the repeating group has no content (e.g. user has no friends) the header bar will also disappear making navigation impossible.

Any recommendations? Thanks :slight_smile:

You can’t display anything inside an empty repeating group… if a repeating group has no data it won’t display…

The best thing that do in your case is to take the header bar out of the repeating group (there’s no reason it should be in there) and just use a regular group for it.

1 Like

The reason it’s in the repeating group is so the user can scroll past the header and isn’t always in view which is cleaner from a ui perspective. It’s the same as Instagram stories:
Insta header

If I was to separate it from the repeating group, there would be no way for me to hide it (as you can’t change a condition based on the RG scroll position)

The way we solve this problem is to actually add a “dummy record” to the Data Type’s data. We give it some unique data fields so that we can filter it out of the actual data set (e.g. Name=“HEADER_RECORD” and/or Display = “no”).

Then we do a merge with on the two “Do a search for” (the first is the search for the dummy record, the second your current RG search - minus the filter to make sure you don’t pick up the dummy record (e.g. Display = “yes”).

2 Likes

I’m not sure I understand your specific use case….

But you can always create some dummy data, and use that always as the RGs first item so it’s never empty.

1 Like

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