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!