Repeating Group List Counts

I have a sidebar with a list of navigation links. Think of it as a task manager with items like Inbox, Focus, Projects, etc. These links are populated from an option set and are displayed in rows of a repeating group.

Next to each “list” (navigation link) I’d like to display the number of items in that list. This would be trivial if each list corresponded to a data type in the database.

The issue is that some links are directly linked to a data type (such as Projects), but others are a subset of a data type (such as Inbox which would only have items that have not yet been assigned).

Of course, I know how to calculate how many items are in each list, but how do I display this on a row of a repeating field when sometimes I need to count how many of a data type and other times I need to do various searches?

I’ve tried creating a new data type to hold the count of each list, but I still can’t figure out how to get that to correspond with the navigation links in the sidebar.

The only other thing I can think of is to have separate elements for each different search or count, and then conditions to only show on the corresponding row. But this seems clunky to have all those extra elements on each row. I think there is probably a much better way.

Any suggestions? Thank you!

Have the counts ready outside of the OS RG and display them using the RG index.

Example: count1: 67, count2:86, count3: 43… Then on each row choose to display those counts if the index row is 1, or 2 or 3 …

Any ideas of the best way to handle that if I add lists later, perhaps changing the indices? I’d rather find a more dynamic solution that won’t break as the app grows.

Thank for the idea. I will give that a try.

The counts run dynamically with search expressions in rg elements. Place them in a hidden popup so that they get loaded on to the page and do not disrupt your UI. But the search will be constant.

Or … just create the RG with empty data sources and just display the counts based on triggers.

Up to you :wink:

Thanks. I guess I forgot to add that the RG has a data source of type Task, which fill each row with the tasks appropriate for that page. This is why I was having trouble figuring out how to have different searches for each row. I’m getting closer. Thanks for the help.

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