Hi,
Please see the attached file for a possible solution to making the segments 1-9 repeat.
This was achieved by controlling the index parameter of a Selector operator with an expression. It uses a modulo command which always returns the remainder of a division. So by taking the segment counter and then dividing it by the number of products to repeat I can get a repeating pattern. To see how it works, here's the Segment counter with modulo 3:
Segment Count 1 2 3 4 5 6 7 8 9 10 ....
Mod 3 1 2 0 1 2 0 1 2 0 1 ....
You'll notice that when the number divides perfectly the mod command returns 0 because there is no remainder. To get around this I add one to the result. which give you...
Segment Count 1 2 3 4 5 6 7 8 9 10 ....
Mod 3 2 3 1 2 3 1 2 3 1 2 ....
All good so far! The problem now is that the sequence starts on 2. The easy fix here is to subtract one from the segment count so that it starts at 0 (+1 remember). Essentially I'mm offsetting the counter by 1 to counteract the addition in the previous step.
The equation for this looks like this.
mod(SegmentXCounter-1,Input1)+1Input1 in this equation represents the number of products you want to repeat, so if Input 1 is 3 you'll return
Segment Count 1 2 3 4 5 6 7 8 9 10 ....
Mod 3 1 2 3 1 2 3 1 2 3 1 ....
I've also added the option to repeat products within that cycle so you could have for example products repeat in a pattern 111222333444111222333444... To repeat numbers you take the output of this equation and divide it by the number of times you want to repeat and then multiply Input 1 by the same number. Finally, use a ceiling command to round the result up to the nearest whole value. The resultant equation looks like this
ceil((mod(SegmentXCounter-1,Input1)+1)/Input2)Where Input1 is the number of products multiplied by the number of times you'd like them to repeat, and Input2 is simply the number of times you'd like them to repeat.
I hope that helps, please let me know if you have any further questions.
Many Thanks,
Paul