# Get Tag's Custom Parameter In Gateway Tag Change Script

**URL:** <https://forum.inductiveautomation.com/t/get-tags-custom-parameter-in-gateway-tag-change-script/110473>\
**Category:** Ignition\
**Created:** [September 9, 2025, 12:30am UTC](https://forum.inductiveautomation.com/t/get-tags-custom-parameter-in-gateway-tag-change-script/110473 "2025-09-09T00:30:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcarpenter](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@dcarpenter](https://forum.inductiveautomation.com/u/dcarpenter)\
**Post date:** [September 9, 2025, 12:30am UTC](https://forum.inductiveautomation.com/t/get-tags-custom-parameter-in-gateway-tag-change-script/110473/1 "2025-09-09T00:30:00Z")

</div>

I am trying to read a UDT’s custom parameter in the Gateway Tag Change Script.

I have tried both

- `system.tag.getConfiguration(tagPath)[0][‘parameters’][‘CommandName’].value`
- `system.tag.readBlocking(tagPath + “.Parameters/CommandName’)`

Both return the UDT’s parameter but they do not substitute any values in the parameter, such as `{InstanceName}`

Example returned value = `Parameter[CommandName]={datatype=String, value={bindType=parameter, binding={InstanceName}}}`

Inside a specific tag change script, those parameters return the substituted parameters, not the raw parameter. Is there a way, from inside a global tag change script, to get the substituted parameter values?

---

<div class="post-metadata">

**Author:** ![Cose\_Peter1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cose_peter1/32/79174_2.png) [@Cose\_Peter1](https://forum.inductiveautomation.com/u/Cose_Peter1)\
**Post date:** [September 9, 2025, 6:38am UTC](https://forum.inductiveautomation.com/t/get-tags-custom-parameter-in-gateway-tag-change-script/110473/2 "2025-09-09T06:38:11Z")

</div>

> [@dcarpenter](#):
>
> UDT’s custom parameter

1. UDTs have **parameters** and **custom properties**. Which one are you using?

2. What is the `tagPath` that you are trying to target? Is it the **UDT instance** or the **UDT definition**?

---

<div class="post-metadata">

**Author:** ![dcarpenter](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@dcarpenter](https://forum.inductiveautomation.com/u/dcarpenter)\
**Post date:** [September 9, 2025, 3:37pm UTC](https://forum.inductiveautomation.com/t/get-tags-custom-parameter-in-gateway-tag-change-script/110473/3 "2025-09-09T15:37:24Z")

</div>

1. I am trying to target the UDT’s parameters, as seen in the UDT definition below

2. I am targeting the UDT instance, each instance has their own parameter values (overridden at the instance)

---

<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:** [September 9, 2025, 3:52pm UTC](https://forum.inductiveautomation.com/t/get-tags-custom-parameter-in-gateway-tag-change-script/110473/4 "2025-09-09T15:52:13Z")

</div>

Parameters cannot have bindings in the base definition. They can only have bindings when nested as instances in an outer UDT. In other words, parameters are expected to be independent of each other.

---

<div class="post-metadata">

**Author:** ![dcarpenter](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@dcarpenter](https://forum.inductiveautomation.com/u/dcarpenter)\
**Post date:** [September 9, 2025, 4:42pm UTC](https://forum.inductiveautomation.com/t/get-tags-custom-parameter-in-gateway-tag-change-script/110473/5 "2025-09-09T16:42:44Z")

</div>

Oh! That is odd, because what is shown in the screenshot above seems to work if I pull those parameters while inside the “Value” tag change script.

This works as I expect in the tag’s change script (not gateway change script), with the returned value having the substitutions.  
` `  
`cmdName = tag['parameters']['CommandName'] `  
`nodeName = tag['parameters']['NodeName']`

I will rework my idea with the assumption the parameters are not supposed to return the substituted values

---

<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:** [September 9, 2025, 4:53pm UTC](https://forum.inductiveautomation.com/t/get-tags-custom-parameter-in-gateway-tag-change-script/110473/6 "2025-09-09T16:53:54Z")

</div>

Try creating custom properties of the UDT with bindings to the parameters, and read those.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [September 9, 2025, 5:22pm UTC](https://forum.inductiveautomation.com/t/get-tags-custom-parameter-in-gateway-tag-change-script/110473/7 "2025-09-09T17:22:54Z")

</div>

I’ve gotten into a habit of always making a “parameters” tag folder in my UDT that just has direct bindings to the UDT parameters rather than reading the parameter itself.

This also comes in handy when nesting UDTs because some parameters share names but have unique suffixes to avoid parameter conflicts when nesting, but scripts with relative tag paths can be used if the “parameter tag” is used instead.

---

<div class="post-metadata">

**Author:** ![dcarpenter](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@dcarpenter](https://forum.inductiveautomation.com/u/dcarpenter)\
**Post date:** [September 10, 2025, 12:24am UTC](https://forum.inductiveautomation.com/t/get-tags-custom-parameter-in-gateway-tag-change-script/110473/8 "2025-09-10T00:24:29Z")

</div>

Thanks for the suggestion! I went your route because it just makes it more apparent in the UDT structure verses using custom properties like pturmel suggested.

Both accomplishes the same result
