# Referencing parent UDT parameters within nested UDT parameter values

**URL:** <https://forum.inductiveautomation.com/t/referencing-parent-udt-parameters-within-nested-udt-parameter-values/49221>\
**Category:** Ignition\
**Created:** [July 27, 2021, 12:51am UTC](https://forum.inductiveautomation.com/t/referencing-parent-udt-parameters-within-nested-udt-parameter-values/49221 "2021-07-27T00:51:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 27, 2021, 12:51am UTC](https://forum.inductiveautomation.com/t/referencing-parent-udt-parameters-within-nested-udt-parameter-values/49221/1 "2021-07-27T00:51:01Z")

</div>

I have a UDT definition that has a few UDT instances nested within it, for example **Pump** below.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/c/dc969120f923e3f46f0da28c1973fda8129a24fd.png)

The **Main UDT** definition has these parameters:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/b/9b63b102a73f71541e20c96049fe3dfd713316fe.png)

The **Pump UDT** instance has these parameters:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/1/514a8cc5ecf9de6ab9a11ba6d08f8f11d5b42813.png)

I am trying to reference the values of the parameters in the **Main UDT** (E.g. `Description`) within the **Pump UDT** (E.g. in `Alarm_ParentDevice`), however it’s returning the value of the **Pump UDT** ’s `Description` instead of the **Main UDT** ’s `Description`.  
E.g.  
Pump UDT’s `Alarm_ParentDevice` = “Pump” instead of “Mobile Pump Station 1 Pump”

Where the value is blank in the pump UDT, it _does_ reference the Main UDT’s value (e.g. `Alarm_Area` and `Alarm_ParentDevice`), however if the value is not blank, then it seems to use its own value making it impossible to to cascade parameters ☹

Is there any way to force the nested UDT to use the referenced values of the parent?

---

<div class="post-metadata">

**Author:** ![rbabcock](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rbabcock/32/13425_2.png) [@rbabcock](https://forum.inductiveautomation.com/u/rbabcock)\
**Post date:** [July 30, 2021, 1:51pm UTC](https://forum.inductiveautomation.com/t/referencing-parent-udt-parameters-within-nested-udt-parameter-values/49221/2 "2021-07-30T13:51:02Z")

</div>

In this situation I usually use a second parameter in the nested instance (for example: Parent\_Description) and use {Description} as the value. That’ll reference the parent’s parameter value.

---

<div class="post-metadata">

**Author:** ![johannes.bo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/johannes.bo/32/27628_2.png) [@johannes.bo](https://forum.inductiveautomation.com/u/johannes.bo)\
**Post date:** [March 28, 2022, 6:25pm UTC](https://forum.inductiveautomation.com/t/referencing-parent-udt-parameters-within-nested-udt-parameter-values/49221/3 "2022-03-28T18:25:48Z")

</div>

I have a similar situation 😉  
-However both “Pump”-udt and “Sensor”-udt are inheriting from “Base”-udt  
-Base-udt provides typical parameters to both, like “Name” and “Description” and “DeviceName”

UDT hierarchy:  
Base\<-Pump  
Base\<-Sensor  
Pump/Sensor of type Sensor

Sometimes I use Sensor standalone and parameter DeviceName is used in OPC item path fex  
The problem occurs when I try to add Sensor as a udt-type into my pump UDT (to save some engineering)

-Now both pump and sensor have parameter DeviceName. And the parameter name may not be modified since they both initially get it from Base :-/

Have I painted myself into a corner, or does anyone have a best-practice or idea how to get out of this corner 😉  
-Would it be nice to be able to explicitly address parameters of the “parent udt”?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 28, 2022, 7:01pm UTC](https://forum.inductiveautomation.com/t/referencing-parent-udt-parameters-within-nested-udt-parameter-values/49221/4 "2022-03-28T19:01:59Z")

</div>

If you’re embedding sensor into pump, then can’t you just override the sensor params in that pump udt? Or have I missed something 🤔

---

<div class="post-metadata">

**Author:** ![Joaquin\_De\_Lucia](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@Joaquin\_De\_Lucia](https://forum.inductiveautomation.com/u/Joaquin_De_Lucia)\
**Post date:** [November 8, 2024, 3:42pm UTC](https://forum.inductiveautomation.com/t/referencing-parent-udt-parameters-within-nested-udt-parameter-values/49221/5 "2024-11-08T15:42:04Z")

</div>

it is possible to call the parent parameter writing in the child one {Root_parameter\_name_}

---

<div class="post-metadata">

**Author:** ![jacob.mann](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jacob.mann/32/35821_2.png) [@jacob.mann](https://forum.inductiveautomation.com/u/jacob.mann)\
**Post date:** [March 28, 2025, 4:41am UTC](https://forum.inductiveautomation.com/t/referencing-parent-udt-parameters-within-nested-udt-parameter-values/49221/6 "2025-03-28T04:41:49Z")

</div>

Could you please expand on the syntax for this, i cant get it to work?

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [March 31, 2025, 5:04am UTC](https://forum.inductiveautomation.com/t/referencing-parent-udt-parameters-within-nested-udt-parameter-values/49221/7 "2025-03-31T05:04:38Z")

</div>

It's a simple matter of putting the parameter names in brackets:  
**Example:**

```python
{parameter1}{parameter2}{parameter3}{InstanceName}.SubTagName

```
