# Passing indirect values back up through templates

**URL:** <https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [April 17, 2025, 12:33pm UTC](https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222 "2025-04-17T12:33:53Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![wschauer](https://avatars.discourse-cdn.com/v4/letter/w/ecccb3/32.png) [@wschauer](https://forum.inductiveautomation.com/u/wschauer)\
**Post date:** [April 17, 2025, 12:33pm UTC](https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222/1 "2025-04-17T12:33:53Z")

</div>

I am looking for the correct way to get values from inside a template repeater back out to the parent component. The parent component has a template repeater that displays a template for all the individual UDT's within a folder. Then inside the template which represents each UDT, we have indirect tag references to pull the individual tags. I want to pull a date from the base UDT and pass it back up to the parent component. Overall goal is to do this twice since we have nested templates and repeaters but if its possible at one level it should work for both I think...

Based on some initial research it sounds like it should be possible with System.util.sendMessage. but i'm wondering if there is a more standard way of doing this.

---

<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:** [April 17, 2025, 1:07pm UTC](https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222/2 "2025-04-17T13:07:28Z")

</div>

You say "template repeater", which is a Vision component. (You should tag the topic properly.) If so, then a script within a template can traverse outward in the component hierarchy with three `.parent.parent.parent` references at the template root level. (Also for the template canvas. Just `.parent.parent` for the singleton template holder.)

If not Vision, you need `system.perspective.sendMessage()`. (Perspective isolates views from each other. Vision does not isolate anything.)

---

<div class="post-metadata">

**Author:** ![wschauer](https://avatars.discourse-cdn.com/v4/letter/w/ecccb3/32.png) [@wschauer](https://forum.inductiveautomation.com/u/wschauer)\
**Post date:** [April 17, 2025, 1:25pm UTC](https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222/3 "2025-04-17T13:25:24Z")

</div>

Thanks for the response, updated the topic tag as well.

I am probably doing it wrong then because when I try and reference a parent property from the template that exists on the template repeater I get  
"NameError: name 'parent' is not defined"

---

<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:** [April 17, 2025, 2:02pm UTC](https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222/4 "2025-04-17T14:02:23Z")

</div>

You cannot do this in a binding. It can only be done in a script. Please show more of what you are trying.

---

<div class="post-metadata">

**Author:** ![wschauer](https://avatars.discourse-cdn.com/v4/letter/w/ecccb3/32.png) [@wschauer](https://forum.inductiveautomation.com/u/wschauer)\
**Post date:** [April 17, 2025, 2:43pm UTC](https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222/5 "2025-04-17T14:43:27Z")

</div>

Sure, This is the code which sits in the property change script on the template. Essentially just looks to see if the UDT has a valid start date then it tries to write to the ActiveStepDate which is a custom property on the template repeater.

```python
 if event.source.getComponent('schedStartlbl').text != "":
	event.source.parent.ActiveStepDate = event.source.getComponent('schedStartlbl').text

```

---

<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:** [April 17, 2025, 2:56pm UTC](https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222/6 "2025-04-17T14:56:11Z")

</div>

That doesn't look like a valid propertyChange event script for Vision. You aren't checking the event's propertyName--that is mandatory. Also, please format posted code **as code** , so indentation is preserved: [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).

You don't have enough `.parent` references to get to an outer object. Also note that there is a quirk of Vision that prevents the proper jython wrapper being applied in this case--the simplest fix for that is to install my Integration Toolkit. Without the fix, a custom property like `.ActiveStepDate` won't work.

---

<div class="post-metadata">

**Author:** ![wschauer](https://avatars.discourse-cdn.com/v4/letter/w/ecccb3/32.png) [@wschauer](https://forum.inductiveautomation.com/u/wschauer)\
**Post date:** [April 17, 2025, 3:53pm UTC](https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222/7 "2025-04-17T15:53:17Z")

</div>

Yeah I am really just trying to prove out the concept so pushing that up one level would work for my testing.  
I will double check my code. I think I have used similar scripts on source components that worked. In the notes it indicates that the property change script fires whenever a bindable property of the source component changes which is why I thought this would work as well.  
Do you mind linking to your Integration Toolkit? Il take all the help I can get.

---

<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:** [April 17, 2025, 3:55pm UTC](https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222/8 "2025-04-17T15:55:59Z")

</div>

> [@Automation Professionals' Integration Toolkit Module](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934):
>
> Automation Professionals is pleased to announce the immediately availability of a major upgrade to its free Simulation Aids Integration Toolkit module. The new feature justifying the "major upgrade" language is the implementation of eleven thirty-one new expression functions which use iteration to accomplish complex transforms of datasets and lists, to or from other datasets and lists, applying filtering, ordering, and computed new columns along the way. While there are certain operations that…

(Newest production release at my module sales page.)

---

<div class="post-metadata">

**Author:** ![wschauer](https://avatars.discourse-cdn.com/v4/letter/w/ecccb3/32.png) [@wschauer](https://forum.inductiveautomation.com/u/wschauer)\
**Post date:** [April 17, 2025, 5:26pm UTC](https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222/9 "2025-04-17T17:26:37Z")

</div>

Thanks.  
I haven't yet gone into your Toolkit but that's my next step.  
Just to confirm.  
Is the quirk in the vision components here that when you try and move up through the levels you end up stepping outside the normal container structure?  
I am now seeing a reference to `javax.swing.JViewport` when I try and go 3 levels up.

---

<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:** [April 17, 2025, 5:43pm UTC](https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222/10 "2025-04-17T17:43:34Z")

</div>

No it is an artifact of Ignition only applying the `PyComponentWrapper` on selected component functions, so it won't apply to plain Swing object method return values. My toolkit registers a global jython type adapter to catch that flaw.

---

<div class="post-metadata">

**Author:** ![wschauer](https://avatars.discourse-cdn.com/v4/letter/w/ecccb3/32.png) [@wschauer](https://forum.inductiveautomation.com/u/wschauer)\
**Post date:** [April 18, 2025, 6:48pm UTC](https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222/11 "2025-04-18T18:48:57Z")

</div>

In this case would you use that globalVarMap instead of passing the parameters back up the chain?

---

<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:** [April 18, 2025, 6:59pm UTC](https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222/12 "2025-04-18T18:59:52Z")

</div>

I rarely use `globalVarMap()` in Vision.

---

<div class="post-metadata">

**Author:** ![wschauer](https://avatars.discourse-cdn.com/v4/letter/w/ecccb3/32.png) [@wschauer](https://forum.inductiveautomation.com/u/wschauer)\
**Post date:** [April 18, 2025, 7:01pm UTC](https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222/13 "2025-04-18T19:01:18Z")

</div>

what would you recommend here?

---

<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:** [April 18, 2025, 7:08pm UTC](https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222/14 "2025-04-18T19:08:07Z")

</div>

Use the chain of `.parent` references to reach the repeater component, rely on my toolkit to ensure its custom props and methods work properly, and manipulate those directly.

---

<div class="post-metadata">

**Author:** ![wschauer](https://avatars.discourse-cdn.com/v4/letter/w/ecccb3/32.png) [@wschauer](https://forum.inductiveautomation.com/u/wschauer)\
**Post date:** [April 18, 2025, 7:10pm UTC](https://forum.inductiveautomation.com/t/passing-indirect-values-back-up-through-templates/105222/15 "2025-04-18T19:10:33Z")

</div>

thanks!
