RepeatingGroup Shrink Height to Cell Count

Example scenario would be where;

a) I want to have a vertical scrolling Repeating Group, with max 5 rows visible at any one time.
b) The record set only currently has 3 rows
c) The repeating group would collapse in height to the 3 visible rows and grow up to 5, then scroll if subsequent data was added.

1 Like

If you’re okay with using extended vertical scrolling, this can be accomplished using the :items until option. For example, the data source of the repeating group could be “Do a search for Users:items until 5”. If you only had 3 Users in your app, the repeating group would collapse to show only 3 cells, and grow to 5 once the app had 5 Users. Lyndon found the solution in this post. :slight_smile:

1 Like

Thanks Faye,

I had tried this approach before, but there appears to be an issue where the repeating group is full screen height (with no content while it is loading and then shrinks down to the correct height. That is why I went back to a fixed set of rows

I maybe have to have a bit more of a play to see if I can work round this or work out why it does the weird jump!

2 Likes

If you set the number of rows to be 1 by default, does the same thing happen? That way it should start small and then expand to five, instead of shrinking down? (I think!)

Yep, sure does,

The definition is below;

The designer looks like;

And what happens is as shown in the animated gif…it only happens on first page load;

Ohh! Hmm, mine does not do that with the same setup for some reason. I just tried this on a blank page and I think it may work (but possibly not if you have a lot of elements to load on your page). What if you set the repeating group to be visible on page load, and then create a workflow for ‘When page is loaded’ hide: repeating group. Then show it when the button is clicked? This way it should ‘load’ everything before the User clicks to view their notifications.

The repeating group is on a Group Focus, which is on a reusable element for the user_toolbar. The user_toolbar is visible on every page where the user has logged in. It doesn’t matter how much content is on the page, it still does it.

I’ll have more of a play.

1 Like

I have raised a bug_report for this, I recreated it in my demo app on the 1st attempt to build.

Yes, I think it’s a bug as well. When I tried, this only happened when the repeating group was contained within a GroupFocus element, not when it was placed on the page itself.

Can you also raise a bug report please…maybe you can explain it differently. 2 independent reports maybe better!

Done! :slight_smile:

Hey guys,

Did you hear back about this? I’m experiencing the same issue.

Hi,

Not sure if it was fixed or not, I haven’t been back to revisit it.