Is it possible to create the Template Repeater dataset via a script at runtime?
I’m going to be showing a variable number the templates based on a numerical textbox. I need to use the dataset type as I have two custom properties that I need to assign.
I’ve tried to pull the dataset out and add rows using the system but the new template doesn’t show up in the repeater.
This is my testing code that I’m using to try and get it done:
numInterlocks = event.source.parent.getComponent('numInterlocks').intValue
tempRepeater = event.source.parent.getComponent('interlockRepeater').templateParams
for interlock in range(numInterlocks):
print 'Doing interlock ' + str(interlock)
newRow = [interlock,'Standards/C100/Intlk']
system.dataset.addRow(tempRepeater,newRow)
event.source.parent.getComponent('interlockRepeater').templateParams = tempRepeater
I don’t get any errors… just the “Doing interlock 0” -> 4.
Any ideas? Is what I’m trying to do possible?