Setting A Value From A Template In A Template Repeater

Hi,
On a Template Repeater I could, by scripting, get some properties of the elements:
listElems= event.source.parent.getComponent(‘TemplateRepeaterDataset’).getLoadedTemplates()
for id in listStations:
aux = id.getPropertyValue(‘ElemPropertyX’)

My question is:
Is it possible to use: setPropertyValue(‘ElemPropertyX’) to set a value inside the element?¿
Many thanks,
Guillem

Yes. TemplateRepeater is a DynamicPropertyProvider, which means it exposes get and set property value methods by name:
http://files.inductiveautomation.com/sdk/javadoc/ignition79/795/com/inductiveautomation/factorypmi/application/binding/DynamicPropertyProvider.html#setPropertyValue-java.lang.String-java.lang.Object-

1 Like