Template repeater custom start / count

Looking to see if there is a better way to do this.
Customer wants to have multiple template repeaters on a page (Doesn't want scroll bars just a set amount per area)

Repeater 1 will be Index 1-20
Repeater 2 will be Index 21-40
3 -- 41-60
4 --61-80
5 -- 81-100

Another page will continue from 101

I don't think I can adjust the index start num or can I?

What that leaves me with is making an SQL query that references just a table of numbers and build the dataset for the repeater based on that with a start and stop custom parameter for that repeater. I don't want to manually create the data table for each instance of this that I will do.

Any other ideas or improvements?

Hi @rfolkes, I'm not sure i inderstand your question.

Since you mention Template repeater i'll assume it's Vision.

The index start num for the dataset parameter of the Template Repeater called "templateParam"?
That can be customized since you have to make it yourself, especially with a script since you have that many rows.

What i don't get is why would you need a query? It would return you a dataset anyway and you also have to filter it, so why not just have a script build it?

Wouldn't a script like this build what you want?

Ranges = [(1,20),(21,40),(41,60),(61,80),(81,100)]
for RangeStart,RangeFinish in Ranges:
	print system.dataset.toDataSet(["Index"], [[Index] for Index in range(RangeStart,RangeFinish)])
1 Like