This is a bit complicated, but I have a list of items in my DB. Each item has an item type field. There is one particular item type that I want to condense in my repeating group and just show a count.
So my repeating group would look something like this
Item 1 Type 1
Item 2 Type 1
Item 3 Type 1
Item 4 Type 1
Type 2 (Count 2)
So all items with type 1 show their full details, but items with type 2 just show a count.
One way you do this is with a nested repeating group. The outer repeating group will contain a list of Types. (If “Type” is its own datatype then that RG will be of type “Type”. If “Type” is instead a primitive value like a text or number, the RG will be of that data type.)
Inside the cell of the outer RG, you put another RG. The source for this RG will be some sort of Search or Filter operation that yields Items of Type 1 (which will be “Current Cell’s Type”). Configure it so that it only shows when this list is not empty. [This will show Items of type 1 as a list.]
Also in the cell, construct a text element. Display in this text element what you want to show for Type 2.
You’d have to muck around with the formatting quite a bit.
You could also just do an RG that displays Items of Type 1 and then, below that a similar looking element that displays what you want for Type 2.
It’s all a bit fiddly to do exactly what you want to do.
Of course the other thing that occurs to me is that you should just put a little icon in the cell that toggles between the RG view and the summary view, which is really what you’re designing, if you think about it.