Every X'th cell in Repeating Group

Hello all,

Does anyone know if there’s some fancy way of simulating the options in the image below?

I’m hoping it makes sense, I just wondered if there was a way to display data from another table in every X’th cell consistency even when the data source of the Repeating Group has an order set to it. I was playing with the idea of showing some ADS every so often…

I know I can use the modulo option to determine the X’th cell like this for example, which is great if you want a group to conditionally appear and you don’t care about loosing site of the actual data inside that cell.

current cell’s index <modulo> 10 is 0

But for me, the cells from the first data source would all need to shuffle down by 1 each time an item from your second data source would be displayed.

Am I just trying to do the impossible? Thought I’d ask in case someone managed to make it work with the use of List of Numbers/Expressions/2 RG’s on same page etc.

Well you already know modulo gives you what you want. All you need do is get more creative with styling the inner part of your RG. Consider that an RG cell can have conditionally visible groups inside with entirely different data types/sources.

That’s the thing though, if I had a list of 10 numbers for example, each cell would show 1,2,3,etc up to 10 and the current cell’s number will always be whatever number it is. You stick a group on it, do what you want with the data source but it doesn’t change the fact that the current cell’s number is still in place and your group just hides that number. If you wanted to implant something in the middle of it so it becomes something like 1,2,3,4,AD,5,6,7,8,9,10 then you’re original datasource still has 10 but in fact you should have 11 rows of data. Does that make sense?

Actually I did try using the toolbox plugin to generate a List of Numbers which defined the number of rows in the RG (count from 2 tables). But I couldn’t get the corresponding cells matching up with the correct data from each table.