Placeholder when no more items in repeating group

Hi everyone!

Probably a very simple question:
I have a repeating group with fixed number of cells (1 row, 1 column). What is the best way to display a message smth like ‘No more items for now, come back later’ when there are no more records to display?

Thank you!

do you mean when you have 0 items in the list or when the user has been using some kind of scroll to navigate from one item to another and they get to the end of the list?

Provide more details of what you have set up, like screen shots of workflows, page set up etc.

I have a RepeatingGroup with a state called “Filters”. The user selects options and the RG returns items that match the selected filters. I also created a text box that is not visible when page is loaded. I assigned conditional formatting on the text box to show when RepeatingGroup Filters is empty. I also assigned conditional formatting on the RepeatingGroup to hide when Filters is empty.

Exactly when they get to the end of the list. Right after they reach the end I need to display a message - ‘That’s it for now’.
Imaging that you swipe in Tinder and there are no more users

thank you, that should work

1 Like

another useful thing here would be to set an index custom state to ‘No more items to display’ but how to trigger this event (when the last item in a repeating group has been passed)?

1 Like

What you want to know is the number of items in the list and you can use the :count function to get that.

But the way the R.G. works is that it will only create as many entries as there are items in the list. So if you have 20 items in the list, there will not be a cell #21 ( in bubble each cell has a number and the “current cell’s index” gives you that number.

I believe what you will need to do is create a group that will contain the message you want to display. You need to set up a conditional to hide the r.g. when the user clicks the navigation icon and they are on the final item in the list populating the r.g.

The conditional on the group with the message should be set to make that group visible when the r.g. is not visible.

I don’t think there is a way to put the message into the r.g. because the idea you mention below

would not happen because as I pointed out above in this post, the r.g. only has as many cells as there are items in the list it is to display.

Hi, there is a walk around for this. First set a display sequence parameter example 1,2,3,4, then you filter the parameter base on the sequence parameter. You just put your display parameter as large as possible so that it will dis play No more items at the end. You try not need to limit the Repeating group as the program or the environment data always change.

Hope that help :slight_smile:

This might be helpful

But another idea is to create a repeating group using List of Numbers plugin…you can calculate the number of items in your list of items, then set the List of Numbers to be +1…then create a repeating group that is for display. That r.g. will be displaying the list of numbers as a data source so you get the number of items in the list +1 as the total cells in the repeating group.

Then have another r.g. that is hidden in a popup that contains the list of items by using a datasource “do a search for items”…this will be what you use to count the number of items in the list. But also for showing those items in the r.g. that has the extra cell.

In the r.g. with extra cell need to have a group to display the items…use the datasource for the group as the hidden r.g. item number equal to current cells index…which should get you in cell index 2 item number 2 from the hidden popup. Then add another group that is displaying your message. Conditional formatting to be visible when current cell index is item list count + 1

3 Likes

Another solution I came up with is to use just a group with dynamic data source instead of having a repeating group with fixed amount of cells (1 by 1). In this case I search for one record (first item) at a time. So now I wonder what is the best option here in terms of performance… Actually returning one item at time using indexes should be quite fast. But I also use text search (QuestionBody is in Do a search for User.Questions.QuestionBody)…

What do you think about this?