# Pass Array of Tag Paths to Template Repeater

**URL:** <https://forum.inductiveautomation.com/t/pass-array-of-tag-paths-to-template-repeater/100173>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [December 23, 2024, 5:23pm UTC](https://forum.inductiveautomation.com/t/pass-array-of-tag-paths-to-template-repeater/100173 "2024-12-23T17:23:34Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Lino](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@Jose\_Lino](https://forum.inductiveautomation.com/u/Jose_Lino)\
**Post date:** [December 23, 2024, 5:23pm UTC](https://forum.inductiveautomation.com/t/pass-array-of-tag-paths-to-template-repeater/100173/1 "2024-12-23T17:23:34Z")

</div>

Hi everyone!

I’m working on a project in Ignition and could use some advice. I have multiple screens with numerous setpoints, but instead of having the screens with all the setpoints, I’d like to create a popup that dynamically loads the setpoints for a specific screen.

Here’s what I’m trying to do:

- I want to define a parameter that contains all the tag paths for the setpoints on a screen in an array structure  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/optimized/3X/c/5/c54518fba546c4cdca400d8d8088b41774480018_2_690x43.png)

- I need to pass this array into the Template Repeater’s dataset parameter, so then it should dynamically create the same number of templates as the rows in the array.

I’m stuck on how to convert the array structure into a format that the Template Repeater's dataset. I tried with scripting, but I think I am not doing it in the right way.

Does anyone know how to do this? Or other ways to do it?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 23, 2024, 6:04pm UTC](https://forum.inductiveautomation.com/t/pass-array-of-tag-paths-to-template-repeater/100173/2 "2024-12-23T18:04:47Z")

</div>

There is no native way to do this. The only array-like or list-like datatype in Vision for custom properties is `Dataset` (or very recently, `Document`). You might find my Integration Toolkit's iteration functions helpful for situations like this. (Particularly the dataset-building `unionAll()` function, and the `asList()` function to supply values.)

---

<div class="post-metadata">

**Author:** ![Jose\_Lino](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@Jose\_Lino](https://forum.inductiveautomation.com/u/Jose_Lino)\
**Post date:** [December 23, 2024, 6:11pm UTC](https://forum.inductiveautomation.com/t/pass-array-of-tag-paths-to-template-repeater/100173/3 "2024-12-23T18:11:26Z")

</div>

Thanks for the response! Before trying use a 3rd party module, is there another way to solve this problem? Not by using an array custom property, but to have a popup that has the same number of templates as the screen required in a dynamic way.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 23, 2024, 6:16pm UTC](https://forum.inductiveautomation.com/t/pass-array-of-tag-paths-to-template-repeater/100173/4 "2024-12-23T18:16:38Z")

</div>

You can always dynamically generate your dataset with a script.

---

<div class="post-metadata">

**Author:** ![Jose\_Lino](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@Jose\_Lino](https://forum.inductiveautomation.com/u/Jose_Lino)\
**Post date:** [December 23, 2024, 8:02pm UTC](https://forum.inductiveautomation.com/t/pass-array-of-tag-paths-to-template-repeater/100173/5 "2024-12-23T20:02:51Z")

</div>

Right now, I know how to modify the templateParams dataset in the Template Repeater, but my main challenge is figuring out how to make the number of tags dynamic.

For example, I can manually create multiple properties with individual tag paths, but that’s not ideal. Do you have any suggestions on how to pass a dynamic list of tag paths from a button click to the popup, so the number of templates adjusts automatically based on the provided tags?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 23, 2024, 8:33pm UTC](https://forum.inductiveautomation.com/t/pass-array-of-tag-paths-to-template-repeater/100173/6 "2024-12-23T20:33:24Z")

</div>

Create a dataset custom property on the button to hold a constant dataset for the repeater. On the popup's root container, create a dataset custom parameter to be used as a window parameter. Bind the repeater's dataset property to the popup root container custom property. In the button's action script, retrieve its static dataset and pass it as a window parameter to the popup.

---

<div class="post-metadata">

**Author:** ![Jose\_Lino](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@Jose\_Lino](https://forum.inductiveautomation.com/u/Jose_Lino)\
**Post date:** [December 23, 2024, 10:34pm UTC](https://forum.inductiveautomation.com/t/pass-array-of-tag-paths-to-template-repeater/100173/7 "2024-12-23T22:34:28Z")

</div>

Thank you! I'll try this approach.

---

<div class="post-metadata">

**Author:** ![Usha\_Vilash](https://avatars.discourse-cdn.com/v4/letter/u/b5a626/32.png) [@Usha\_Vilash](https://forum.inductiveautomation.com/u/Usha_Vilash)\
**Post date:** [December 26, 2024, 2:27pm UTC](https://forum.inductiveautomation.com/t/pass-array-of-tag-paths-to-template-repeater/100173/8 "2024-12-26T14:27:33Z")

</div>

Hi, Thanks for sharing this. I’m wondering, how can we update the dataset if the tag paths change after the popup opens? Should we use scripting to update it, or is there an easier way?

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [December 26, 2024, 2:54pm UTC](https://forum.inductiveautomation.com/t/pass-array-of-tag-paths-to-template-repeater/100173/9 "2024-12-26T14:54:00Z")

</div>

I could see dynamically changing tagpaths for a setpoint screen after a popup is loaded leading to unhappy surprises.

I would recommend building your popup to work off a tag path with indirect bindings. You can still indirectly bind everything and dynamically bulid out the list of setpoints based on the tags that exist for a device or system. I would also recommend passing in a unique identifier that ties that popup to that system or device so you can close it specifically.

This is an example script transform that browses a tag path and creates content based on the tags that exist in that tagpath.

```python
def transform(self, value, quality, timestamp):
	 descList = system.tag.browse(value, {'name':'*Mode*'})
	 returnList = []
	 i = 0
	 
	 for x in descList:
	 	i += 1
	 	returnList.append(
  		{
	 	    "instanceStyle": {
	 	      "classes": ""
	 	    },
	 	    "instancePosition": {},
	 	   # "Description": "test", 
	 	    "Index": i,
	 	    "TagPath": value
	 	  })
	 	   
	 return returnList

```

In this case it was creating enumerated template instances that worked off indirect tag paths. I'm just trying to show you the general idea of using system.tag.browse to get information that your popup needs so you can pass in a partial tag path and dynamically build the popup content. This particular script is bespoke and was written to replace a very strange device control model in a legacy system so view it as an example of how to use system.tag.browse to generate dynamic content and not as a useful copy/paste script.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 26, 2024, 3:11pm UTC](https://forum.inductiveautomation.com/t/pass-array-of-tag-paths-to-template-repeater/100173/10 "2024-12-26T15:11:59Z")

</div>

> [@Usha\_Vilash](#):
>
> if the tag paths change

My advice to Jose was based on his specific use-case, where one or more main screens have buttons to open the popup, and where each button has a fixed set of tagpaths to show in the popup.

You should start a **new topic** explaining all the details of **your** situation, and how you want **your** popup to function.

---

<div class="post-metadata">

**Author:** ![Usha\_Vilash](https://avatars.discourse-cdn.com/v4/letter/u/b5a626/32.png) [@Usha\_Vilash](https://forum.inductiveautomation.com/u/Usha_Vilash)\
**Post date:** [December 27, 2024, 1:15pm UTC](https://forum.inductiveautomation.com/t/pass-array-of-tag-paths-to-template-repeater/100173/11 "2024-12-27T13:15:08Z")

</div>

Thanks for explaining.  
I’ll start a new topic and share all the details about my situation and what I need the popup to do. Really appreciate your help.
