How would I build a header for a repeating group? Should I create a table and put a repeating group in it or am I complicating things?
I’ve got a repeating group at the moment on a column layout. I tried inserting a group inside each cell of the repeating group, but it adds it as a new column not a row at the top
I did it this way because it’s easy to keep the header aligned the way you want it. Here is a demo of how mine looks. The header only shows on the first cell:
Maybe I’m misunderstanding what you are looking for?
Added: If for your use case, having the header outside like was mentioned above is better for you, then follow that advice. For my use case, this is how I have mine set up
Oh I see. I missunderstood, sorry! so you’re headers are Merchant Type, Compamny name and so on right? I need it inside the repeating group because i want to have the same style. What’s your header? Just text?
You can design the text however you want… add padding, etc.
If you want every other row to be colored like my example, I use modulo on the row. Although in my demo I should have added some padding and rounded corners to the rows so the coloring would be more uniform with the rg layout:
but, outside you can only make it dynamic at the list level.
Inside you can make it dynamic at the row level.
This is why I was saying inside works best for me.
The demo I showed doesn’t use dynamic at the row level, but I have some repeating groups that do, so I just use this method. Plus, it’s simple and always aligns right
Hey @senecadatabase . I managed to do something, but what I want to do ideally is have one uniffied grey header with name for each column. AS you can see, because I have spacers betweeen columns there is white space between the grey hedaers (i coloured the groups of heading text)
Can you help me understand when a column header would actually need to be dynamic based on a specific row’s content?
Even if you’re faking a header as the first row inside the RG, the header is effectively based on the first item in the list, not on each row independently. In that case you could still drive the header dynamically from “RG:first item” without needing the header to live inside the repeating rows themselves.
If the header is derived from the dataset as a whole, it can live outside and be driven by the first item. If the header needs to react to row boundaries or grouping changes, it has to live inside the repeating context.
If I’m sorting an RG by categories…pizza shops, hair salons, auto shops, etc., an outside header can’t do that.
So, in my case, I want the header to change based on the category.
The only way to do that is to have the header in the RG.
Added: You could also have a header outside the repeating group that had the company name, etc. But to me that is redundant…especially when the first item would have ‘pizza shops’ etc.
Makes sense. I think we’re talking about two different things.
Section/group headers (Pizza Shops, Hair Salons, etc.) would need to live inside the RG since they depend on category groupings.
For column headers (Merchant Type, Company Name, etc.), I usually keep them outside the RG, mainly because 1) If the RG is empty, you often still want the column headers visible and 2) It’s easier to maintain (When the header is faked as the first RG row, people can miss it or accidentally edit it thinking it’s real data) and 3) stickyness is much easier.