Template Repeater problem (Manipulate dataset parameter)

Hi,
I want to manipulate the dataset parameter of a template repeater based on a value.
I have only one template parameter - “Rack_Num”. And i would like to create a column in the dataset with 13 rows.
eg : if VALUE = 1: Rack_Num column to be created in dataset with values 1-13.
if VALUE = 2: Rack_Num column to be created in dataset with values 14-26.
if VALUE = 3: Rack_Num column to be created in dataset with values 27-39.
if VALUE = 4: Rack_Num column to be created in dataset with values 40-52.
if VALUE = 5: Rack_Num column to be created in dataset with values 53-65.

Currently i have just entered values by hand but the requirement is to dynamize the columns based on a value. Just added a screenshot for dataset as it is being used now.
I am using template repeater for the first time and cant get my head around this problem.
Can anyone please help?

I do something similar with the Template Canvas. I manipulate a dataset that is a custom property of the Template Canvas, I then bind this dataset to the built in “Templates” property of the Template Canvas (the “Templates” property defines all the parameters for the Template Canvas). This way you can easily manipulate the dataset to get the desired results with a script and the Template Canvas or in your case Repeater will update with the dataset.